Dialog Overview

 

WIL Dialogs are generated using a block of code that defines all of the elements in the dialog. WIL Dialogs follow a specific format.

The first line sets the format and specifies the version of the Dialog being used.

 

ExampleFormat=`WWWDLGED,6.2`

 

The next section establishes the caption which will appear in the title bar of the dialog box along with the coordinates, size and number of controls, font type, font color and background in the dialog box.

 

ExampleCaption=`Music Selection`

ExampleX=120

ExampleY=050

ExampleWidth=128

ExampleHeight=137

ExampleNumControls=013

ExampleProcedure=`DEFAULT`

ExampleFont=`DEFAULT`

ExampleTextColor=`DEFAULT`

ExampleBackground=`DEFAULT,DEFAULT`

ExampleConfig=0

ExampleDPI=`96,8,16`

 

The third section contains the code for the actual controls. Each line has specific information.

 

Example001=`009,117,050,014,PUSHBUTTON,"PushButton_OK",DEFAULT,"OK",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example002=`069,117,050,014,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Cancel",0,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example003=`085,075,036,016,RADIOBUTTON,"RadioButton_Blues",music,"Blues",1,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example004=`085,059,036,016,RADIOBUTTON,"RadioButton_Jazz",music,"Jazz",2,4,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example005=`085,041,036,016,RADIOBUTTON,"RadioButton_Rock",music,"Rock",3,5,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example006=`047,095,036,014,CHECKBOX,"CheckBox_LOUD!",volume,"LOUD!",1,6,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example007=`085,095,036,014,CHECKBOX,"CheckBox_Quiet",volume2,"Quiet",2,7,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example008=`009,095,036,014,STATICTEXT,"StaticText_VOLUME",DEFAULT,"VOLUME",DEFAULT,8,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

 

etc....

When the first line in the example above is broken down, the parts are as follows.

Code

Definition

Example 

Dialog Variable Name

01

Control Number

009,117,050,014

Coordinates of the control

PUSHBUTTON 

Control Type

"PushButton_OK"

Control Name

DEFAULT 

Variable name

"OK"

Text

1

Value

1

Tab Order

DEFAULT 

Style

DEFAULT 

Font

DEFAULT 

Text color

DEFAULT 

Background color

 

Each Dialog script will end with the following line, making it easy to test the PushButton return values.

 

ButtonPushed=Dialog("Example",1)

 

The completed script looks like the following:

 

 

§         Dialog

§         Dialog Overview

§         Defining the Dialog

§         Defining the Dialog Controls

§         Dialog Control Types

§         Dynamic Dialogs

§         InternetExplorer Controls

§         Dialog Units

§         Dialog Fonts

 

Control Types

§         Calendar

§         Checkbox

§         ComControl

§         DropListbox

§         Editbox

§         FileListbox

§         Groupbox

§         Itembox

§         MenuBar

§         MenuItem

§         MultiLinebox

§         Picture

§         PictureButton

§         PushButton

§         RadioButton

§         ReportView

§         Spinner

§         StaticText

§         VaryText

 

 

tunes = "My Shirona":@TAB:"In the Mood":@TAB:"Staying Alive":@TAB:"Rock Lobster":@TAB:"Tequila"
song="Yellow Submarine"
music=2 ;sets this radiobutton as default
volume=1 ;pre-selects checkbox.

ExampleFormat=`WWWDLGED,6.2` ExampleCaption=`Music Selection` ExampleX=120 ExampleY=050 ExampleWidth=128 ExampleHeight=137 ExampleNumControls=013 ExampleProcedure=`DEFAULT` ExampleFont=`DEFAULT` ExampleTextColor=`DEFAULT` ExampleBackground=`DEFAULT,DEFAULT` ExampleConfig=0 ExampleDPI=`96,8,16`
Example001=`009,117,050,014,PUSHBUTTON,"PushButton_OK",DEFAULT,"OK",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example002=`069,117,050,014,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Cancel",0,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example003=`085,075,036,016,RADIOBUTTON,"RadioButton_Blues",music,"Blues",1,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example004=`085,059,036,016,RADIOBUTTON,"RadioButton_Jazz",music,"Jazz",2,4,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example005=`085,041,036,016,RADIOBUTTON,"RadioButton_Rock",music,"Rock",3,5,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example006=`047,095,036,014,CHECKBOX,"CheckBox_LOUD!",volume,"LOUD!",1,6,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example007=`085,095,036,014,CHECKBOX,"CheckBox_Quiet",volume2,"Quiet",2,7,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example008=`009,095,036,014,STATICTEXT,"StaticText_VOLUME",DEFAULT,"VOLUME",DEFAULT,8,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example009=`007,005,110,014,STATICTEXT,"StaticText_2",DEFAULT,"What is your listening pleasure?",DEFAULT,9,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example010=`007,051,064,040,ITEMBOX,"ItemBox_1",tunes,DEFAULT,DEFAULT,10,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example011=`067,025,056,014,STATICTEXT,"StaticText_3",DEFAULT,"Type Preferred?",DEFAULT,11,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example012=`007,021,058,014,VARYTEXT,"VaryText_1",song,"Choose a title",DEFAULT,12,DEFAULT,DEFAULT,DEFAULT,DEFAULT` Example013=`007,037,062,014,EDITBOX,"EditBox_1",song,DEFAULT,DEFAULT,13,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
ButtonPushed=Dialog("Example")

Here is the completed dialog box.

image\25dciphr_shg.gif

WIL Dialogs can be created manually by constructing the Dialog code block or by using the WIL Dialog Editor. For more on the WIL Dialog Editor, please see the WinBatch.chm help file.