Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: choosing Directory dialog
IntControl(4, 0, 0, 0, 0) disks=`*.` HomeDirDialogFormat=`WWWDLGED,5.0` HomeDirDialogCaption=`Choose the directory` HomeDirDialogX=284 HomeDirDialogY=85 HomeDirDialogWidth=159 HomeDirDialogHeight=118 HomeDirDialogNumControls=3 HomeDirDialog01=`6,16,80,54,FILELISTBOX,disks,DEFAULT` HomeDirDialog02=`62,84,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Ok",1` HomeDirDialog03=`6,2,148,DEFAULT,VARYTEXT,disks,""` ButtonPushed=Dialog("HomeDirDialog") message(`You chose`,disks)
IntControl(4, 0, 0, 0, 0) disks=`c:\*.` HomeDirDialogFormat=`WWWDLGED,5.0` HomeDirDialogCaption=`Choose the directory` HomeDirDialogX=284 HomeDirDialogY=85 HomeDirDialogWidth=159 HomeDirDialogHeight=118 HomeDirDialogNumControls=3 HomeDirDialog01=`6,16,80,54,FILELISTBOX,disks,DEFAULT` HomeDirDialog02=`62,84,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Ok",1` HomeDirDialog03=`6,2,148,DEFAULT,VARYTEXT,disks,""` ButtonPushed=Dialog("HomeDirDialog") disks=DirGet() ;;;;;;;;;;Da magic message(`You chose`,disks)
Here are two examples of using the dialog editor.
In the first example, the FILELISTBOX is used in combination with the EDITBOX control which can have the same variable name as the FILELISTBOX. If you do, the user can type a file mask into the EDITBOX which will cause the FILELISTBOX to be redrawn with the display only those files that match the new file mask specification. Also in combination with the FILELISTBOX, you can use the VARYTEXT control, which may also use the same variable as the FILELISTBOX. If you do so, the VARYTEXT will display the current directory as displayed in the FILELISTBOX. For FILELISTBOX, the last parameter must be DEFAULT. The FileListBox doesn't display directories only, even if you use the DirItemize function. It's not designed that way.
In the second example, the ITEMBOX control is used with DirItemize.
Dirchange("D:\TEMP\") intcontrol(4,0,0,0,0) dirs=FileItemize("*.*") joedialogFormat=`WWWDLGED,5.0` joedialogCaption=`Choose a Directory` joedialogX=2 joedialogY=21 joedialogWidth=146 joedialogHeight=206 joedialogNumControls=6 joedialog01=`6,26,64,DEFAULT,EDITBOX,dirs,"*."` joedialog02=`6,44,134,122,FILELISTBOX,dirs,DEFAULT` joedialog03=`6,8,64,DEFAULT,VARYTEXT,dirs,"Choose a Directory"` joedialog04=`74,28,64,DEFAULT,CHECKBOX,makeadir,"Create Directory",1` joedialog05=`6,186,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Ok",1` joedialog06=`76,186,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0` ButtonPushed=Dialog("joedialog") message(`You chose the directory`,dirs) if makeadir == 1 if !DirExist(dirs) then DirMake(dirs) endif
Dirchange("D:\TEMP\") intcontrol(4,0,0,0,0) dirs=DirItemize("*.*") joedialogFormat=`WWWDLGED,5.0` joedialogCaption=`Choose a Directory` joedialogX=2 joedialogY=21 joedialogWidth=146 joedialogHeight=206 joedialogNumControls=6 joedialog01=`6,26,64,DEFAULT,EDITBOX,xdirs,"*."` joedialog02=`6,44,134,122,ITEMBOX,dirs,dirs` joedialog03=`6,8,64,DEFAULT,VARYTEXT,ydirs,"Choose a Directory"` joedialog04=`74,28,64,DEFAULT,CHECKBOX,makeadir,"Create Directory",1` joedialog05=`6,186,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Ok",1` joedialog06=`76,186,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0` ButtonPushed=Dialog("joedialog") message(`You chose the directory`,dirs) if makeadir == 1 if !DirExist(dirs) then DirMake(dirs) endif
Article ID: W12831
Filename: Choosing a Directory in a Dialog.txt
File Created: 1999:04:15:16:49:56
Last Updated: 1999:04:15:16:49:56