Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Spinner Initial Minimum Maximum Increment decrement
"{minimum}|{maximum}|{increment/decrement}"Make the first item the minimum value and the second the maximum value. Note: The minimum value can be greater than the maximum value but both values must be in the range of –32768 to 32767 and the difference between the values cannot exceed 32767.
The third value indicates the amount to add or subtract from the displayed number each time the user clicks an up or down arrow. The control adds or subtracts one (1) each time, if you do not supply the third value.
The final value selected by the user is placed in the Variable when the dialog function returns.
You can indicate the initial value for your control by placing a number in the in the text attribute of the control definition. The control will default to the minimum value if you do not indicate an initial value or if your initial value does not fall within the range you have selected in the Variable attribute.
settings = "1|100|1" MyDialogFormat=`WWWDLGED,6.1` MyDialogCaption=`WIL Dialog 1` MyDialogX=002 MyDialogY=030 MyDialogWidth=107 MyDialogHeight=092 MyDialogNumControls=002 MyDialogProcedure=`DEFAULT` MyDialogFont=`DEFAULT` MyDialogTextColor=`DEFAULT` MyDialogBackground=`DEFAULT,DEFAULT` MyDialog001=`028,068,033,011,PUSHBUTTON,DEFAULT,"OK",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog002=`034,033,022,015,SPINNER,settings,"1",DEFAULT,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT` ButtonPushed=Dialog("MyDialog") Message("Spinner Value selected",settings)
initvalue = 100 min = 100 max = 1000 increment = 50 settings = StrCat(min, "|", max, "|", increment) ;"100|1000|50" MyDialogFormat=`WWWDLGED,6.1` MyDialogCaption=`WIL Dialog 1` MyDialogX=002 MyDialogY=030 MyDialogWidth=107 MyDialogHeight=092 MyDialogNumControls=002 MyDialogProcedure=`DEFAULT` MyDialogFont=`DEFAULT` MyDialogTextColor=`DEFAULT` MyDialogBackground=`DEFAULT,DEFAULT` MyDialog001=`028,068,033,011,PUSHBUTTON,DEFAULT,"OK",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog002=`034,033,022,015,SPINNER,settings,%initvalue%,DEFAULT,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT` ButtonPushed=Dialog("MyDialog") Message("Spinner Value selected",settings)
Article ID: W15469
File Created: 2012:05:23:08:58:42
Last Updated: 2012:05:23:08:58:42