CheckList - display a dialog box containing check boxes.

Return to Introduction  Previous page  Next page

CheckList("prompt","option1",$var1,"option2",$var2...[,BackButton(label:)][,WindowPos(CENTER)])

[,WindowPos(CENTRE)]

[,WindowPos(DEFAULT)]

[,WindowPos(CURSOR)]

[,WindowPos(top,left[,PIXELS])]

[,WindowPos(row,col,ROWCOL)]

[,WindowPos(row,col,CURSOR)]

Where:

prompt

is text instructing the user to take action.

option1

is the label for the first check box.

$var1

is the variable assigned to the first check box.

option2

is the label for the second check box.

$var2

is the variable assigned to second check box.

BackButton(label:)

Displays a "Back" button in the Check List dialog box. Clicking the back button will cause the script to branch to the specified label.

WindowPos(CENTER)

centers the Check List dialog box over the TN3270 Plus terminal window.

WindowPos(CENTRE)

centers the Check List dialog box over the TN3270 Plus terminal window.

WindowPos(DEFAULT)

centers the Check List dialog box over the TN3270 Plus terminal window. This is the default if the WindowPos parameter is not specified.

WindowPos(CURSOR)

positions the top left corner of the Check List dialog box at the cursor location.

WindowPos(top,left[,PIXELS])

positions the top left corner of the Check List dialog box at the specified pixel offset from the top left corner of the TN3270 Plus window. top and left are the offset in pixels. The offset may be negative to move the dialog box outside the TN3270 Plus window.

WindowPos(row,col,ROWCOL)

positions the top left corner of the Check List dialog box at the specified row and column in the TN3270 Plus terminal window.

WindowPos(row,col,CURSOR)

positions the top left corner of the Check List dialog box at the specified row and column offset from the cursor location in the TN3270 Plus terminal window.

 

The CheckList command presents a list of check box options in a dialog box. The user can check the desired option(s). The variable associated with each check box contains 1 if the option is checked and 0 if the option is not checked.  A variable can be set to 1 prior to the CheckList command to pre-set the check box.

 

Example:

CheckList("What is your favorite color?", _

       "Red",$Red, _

       "Green",$Green, _

       "Blue",$Blue)

 

DialogCheckList75p

 

Sample Script

' CheckList Sample

CheckList("What is your favorite color?", _

       "Red",$Red, _

       "Green",$Green, _

       "Blue",$Blue)

 

if $Red = 1   then $color = Red

if $Green = 1 then $color = Green

if $Blue = 1  then $color = Blue

 

MsgBox("Your favorite color is: " & $color)

exit

 

See Also:

 

Script Command Summary

Script Variables

Using the Scripting Language


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.