DialogBox ControlCommand
This command specifies a script command to run when a control takes an action. The action depends on the kind of control. For example, a button control requires a click, and a scroll bar requires movement. Refer to each control for the action required.
Syntax
DialogBox ControlCommand [name], var_name, script_command
Synonyms
DB CC
Parameters
The following table describes the parameters of the DialogBox ControlCommand command:
| Parameter | Description |
|---|---|
| var_name | The name of the control (button, check box, etc.) |
| script_command | The script command to run when the action takes place |
Examples
The following example
is part of the BARCHART.WIS demonstration program.
DialogBox Create $dlgname 0,0,207,150
Caption title
Style WS_CAPTION|WS_VISIBLE|WS_SYSMENU|WS_MINIMIZEBOX
Font 8,"helv"
Control "",Graph,"winteg.draw",WS_VISIBLE,0,10,200,120
DefPushButton "&Close",Cancel,84,136,37,12
ControlCommand Cancel,"DialogBox End ":dlgname:";DialogBox
Delete ":dlgname
MinIcon "icon\wint_bar.ico"
EndCreateRelated Script Commands
DialogBox Default, DialogBox Validate