Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
;to expand/contract, just use winplaceset on the dialog caption (which is the ;title of that window). ; ;you want to contract the dialog right within the callback init routine so ;that when it appears, it appears in the smaller form. IIRC, this is possible ;because although the window is not yet visible, you can reference it. ; ;you can use dialogcontrolset to change the title on the button ; GoSub localfuncs MyDialogFormat=`WWWDLGED,6.1` MyDialogCaption=`YammerFratz` MyDialogX=140 MyDialogY=113 MyDialogWidth=164 MyDialogHeight=122 MyDialogNumControls=005 MyDialogProcedure=`callback` MyDialogFont=`DEFAULT` MyDialogTextColor=`DEFAULT` MyDialogBackground=`DEFAULT,DEFAULT` MyDialogConfig=4513660 MyDialog001=`011,029,036,012,PUSHBUTTON,DEFAULT,"OK",1,1,32,DEFAULT,DEFAULT,DEFAULT` MyDialog002=`055,029,036,012,PUSHBUTTON,DEFAULT,"Cancel",0,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog003=`009,009,118,012,STATICTEXT,DEFAULT,"yatta yatta",DEFAULT,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog004=`099,029,036,012,PUSHBUTTON,DEFAULT,"More>>",2,4,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog005=`009,067,044,012,STATICTEXT,DEFAULT,"Blah Blah",DEFAULT,5,DEFAULT,DEFAULT,DEFAULT,DEFAULT` ButtonPushed=Dialog("MyDialog") Exit :localfuncs #DefineFunction callback(DH, EC, CN, un4, un5) winnam = "YammerFratz" smallersize = 150 biggersize = 250 Switch 1 Case EC == 0 DialogProcOptions(DH, 2, 1) Case EC == 2 && CN == 004 GoSub change Return -2 EndSwitch Return -1 :change s = WinPlaceGet(@NORMAL,winnam) x0 = ItemExtract(1,s," ") y0 = ItemExtract(2,s," ") y1 = ItemExtract(4,s," ") If y1-y0 > smallersize s = ItemReplace(y0+smallersize, 4, s, " ") DialogControlSet(DH, 004, 4, "More") Else s = ItemReplace(y0+biggersize, 4, s, " ") DialogControlSet(DH, 004, 4, "Less") EndIf s = ItemReplace(y0+1, 2, s, " ") ; correct for bizarre creep behavior s = ItemReplace(x0+1, 1, s, " ") ; correct for bizarre creep behavior WinPlaceSet(@NORMAL,winnam,s) Return #EndFunction Return
Article ID: W15915
File Created: 2004:03:30:15:41:42
Last Updated: 2004:03:30:15:41:42