Item List Box

 

A selection list box. The Item List Box allows the user to choose an item from a list box. This option is similar to the WIL function AskItemList.

The variable, defined in the controls Variable attribute, is assumed to contain a tab delimited list.

The user may choose none, one, or more items in the list. When the dialog box is closed, the selected items are returned via the variable, defined in the controls Variable attribute, as a tab delimited list. If the user selects more than 99 items, an error will occur.

Note: The list is loaded into the list box in the original order (Use the WIL ItemSort function if a sorted list is desired.).

By default, the Item List Box allows multiple selections. To disable this feature use IntControl 33.

 

IntControl(33, 0, 0, 0, 0)

 

For more information on IntControl, see the Windows Interface Language help file.

 

image\itemlb.gif

Control Attributes

 

Calendar

Check Box

Com Control

DateTime

Drop-down Combo Box

Edit Box

File List Box

Group Box

Item List Box

Menu Bar

Menu Item

Multiline Edit Box

Picture

Picture Button

Push Button

Radio Button

Report View

Spinner

Static Text

Variable Text

 

 

For example, the line in the script generated by the WIL Dialog Editor may look like:

 

Songs003=`017,031,108,048,ITEMBOX,"ItemBox_1",tunes,DEFAULT,DEFAULT,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

 

This example shows how to define the list to display and how to set a default item in the list

 

defaultsong = "My Shirona"
tunes="My Shirona":@TAB:"In the Mood":@TAB:"Staying Alive":@TAB:"Rock Lobster":@TAB:"Tequila"
SongsFormat=`WWWDLGED,6.2`
SongsCaption=`Songs`
SongsX=236
SongsY=124
SongsWidth=152
SongsHeight=109
SongsNumControls=004
SongsProcedure=`DEFAULT`
SongsFont=`DEFAULT`
SongsTextColor=`DEFAULT`
SongsBackground=`DEFAULT,DEFAULT`
SongsConfig=0
Songs001=`029,087,034,014,PUSHBUTTON,"PushButton_OK",DEFAULT,"OK",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Songs002=`071,087,034,014,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Cancel",0,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Songs003=`017,031,108,048,ITEMBOX,"ItemBox_1",tunes,DEFAULT,DEFAULT,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Songs004=`019,011,104,014,STATICTEXT,"StaticText_1",DEFAULT,"Choose your favorite song:",DEFAULT,4,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
ButtonPushed=Dialog("Songs")
Message("Your Favorite Song is:",tunes)
See Also:

Report View