I like to use Variables for the dialogtitle (Caption) and also for the Checkboxes.
For all other dialogelements i used, it works well. The Values for the variables are normally stored in a inifile to support the dialog with different languages.
In between i found 1 more place, where variables don't work as i expect:
- If a Variable is used for the text on the Browsebutton the browse dialog won't show up, when clicked.
Codesample:
Code: Select all
LibFunc>user32,GetSystemMetrics,screen_width,0
LibFunc>user32,GetSystemMetrics,screen_height,1
Let>width=450
Let>height=285
Let>left={(%screen_width% div 2) - (%width% div 2)}
Let>top={(%screen_height% div 2) - (%height% div 2)}
Dialog>DSSCdlg
Caption=%100%
Top=%top%
Width=%width%
Left=%left%
Height=%height%
Max=0
Min=0
Resize=0
Label=%101%,16,8,true
Label=%102%,304,8,true
ComboBox=strInstanceName,64,8,233,%strInstanceName%
Button=OK,256,136,75,25,1
Button=%103%,344,136,75,25,2
Label=____________________________________________________________________,8,112,true
Label=%104%,16,104,true
CheckBox=disclaimer,%105%,16,144,17,False
Memo=disclaimertext,16,168,409,73,LIABILITY EXCLUSION. ....
Label=%106%,16,72,true
Edit=strDBFilePath,96,72,233,%strDBFilePath%
Button=%107%,344,72,75,25,0
Edit=strDBName,96,40,201,%strDBName%
Label=%108%,16,40
FileBrowse=Browse,strDBFilePath,Dir|*.willneverexist,dir,C:\
EndDialog>DSSCdlg
Let>Language=English
Let>WParam=3
Let>100=DSDBAttach V1.0 - Binds a blank SIRONA Database to a SQL Server
Let>101=Select:
Let>102=Quit with "SHIFT + ESC"
Let>103=Cancel
Let>104=This tool is only for use with MS SQL-Server 2005 or SQL-Server 2005 Express.
Let>105=I accept the exclusion of liability:
Let>106=Database Path:
Let>107=Browse
Let>108=Databasename:
Label>MainLoop
Show>DSSCdlg,result
If>result=1,Init
If>result=2,Abbruch
Goto>MainLoop