Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Variable Number Controls Dialog Dynamically Create
Here is one example:
namelist='Alan':@TAB:'Bob':@TAB:'Charlie':@TAB:'David':@TAB:'Edgar':@TAB:'Fred':@TAB:'George':@TAB:'Howard':@TAB:'Ian':@TAB:'Jeff' :@TAB:'Kevin':@TAB:'Lee':@TAB:'Morrie' count = ItemCount(namelist,@TAB) MyDialogFormat=`WWWDLGED,6.2` MyDialogCaption=`Dynamic Name Lister` MyDialogX=9999 MyDialogY=9999 MyDialogWidth=150 MyDialogHeight=116 MyDialogNumControls=(count)+3 ;Includes two pushbuttons MyDialog001=`011,007,048,012,PUSHBUTTON,"PushButton_Ok",DEFAULT,"&OK",1,10,32,DEFAULT,DEFAULT,DEFAULT` MyDialog002=`065,007,048,012,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"&Cancel",0,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog003=`011,023,100,012,STATICTEXT,"StaticText_2",DEFAULT,"Name(s):",DEFAULT,50,DEFAULT,DEFAULT,DEFAULT,DEFAULT` controlcount = 3 ;builds dialog controls for each item For xx=1 To count item = ItemExtract(xx,namelist,@TAB) dlgup= xx + controlcount dlgup = StrFixLeft(dlgup,0,3) vert = (xx*11) + 25 MyDialogHeight=MyDialogHeight+8 MyDialog%dlgup%=`020,%vert%,050,012,CHECKBOX,"CheckBox_1",update%xx%,"%item%",1,80,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Next ButtonPushed=Dialog("MyDialog") Exit
Article ID: W15119
File Created: 2010:04:23:09:19:08
Last Updated: 2010:04:23:09:19:08