You can create dialog boxes and forms with a variety of controls. You must link each control to an action before it can perform a task. For example, you can write a link command for a button that displays another dialog box when clicked.
Linking bitmap buttons
The following examples give you an idea of the items you can select from the events list, the link commands list, and the other lists in the Object Link dialog box.
Example 1
Displays the dialog box named Warning2 when the button is clicked.
List Choose
On ON
Link Events Clicked
Link Command EXECUTE
Object Selector list Warning2
Selected object Properties Execute
Example 2
Hides the button named BitmapButton1 when the dialog box initially displays.
List Choose
On ON
Link Events Init
Link Command SET
Link Control Properties Yes TO
Object Selector BitmapButton1
Selected Object Properties Hidden
Linking push buttons
A push button runs a specified command when clicked by the user.
Example 1
Makes the list box named ListBox6 run any link commands attached to it that respond to the event trigger.
List Choose
On ON
Link Events Clicked
Link Command TRIGGER
Object Selector ListBox6
Selected Object Properties Trigger
Linking check boxes
Example 1
Sets the text appearing by the check box button when the dialog box initially displays. The text is taken from the cell A:C23.
List Choose
On ON
Link Events Init
Link Command RECEIVE
Link Control Properties Label_Text FROM
Object Selector A:C23
Selected Object Properties Value
Linking combo boxes
By default, a drop-down list is created that has an edit field where users can enter information, or they click the down arrow and choose an option from the list.
Example 1
Sets the typeface of the label named Label5 as the user scrolls through the combo box's list of items.
List Choose
On ON
Link Events ValueChanged
Link Command SEND
Link Control Properties Value TO
Selected Object Label5
Selected Object Properties Label_Font.TypeFace
Linking edit fields
Example 1
Displays the point size of the active cells (or cell). This link command is triggered by another link command (see Link timer controls for an example of a link command that does this).
List Choose
On ON
Link Events Init
Link Command RECEIVE
Link Control Properties Value FROM
Selected Object A:A1
Selected Object Properties Value
Example 2
As the user types text into the edit field, the text is copied into the active cell and stored there as a label (using the String_Value property).
List Choose
On ON
Link Events Valuechanged
Link Command SEND
Linked Control Properties Value TO
Selected Object A:A1
Selected Object Properties String_Value
Example 3
When the user types text into the edit field and presses ENTER, the text is entered into the active cell exactly as it was typed by the user.
List Choose
On ON
Link Events Enter
Link Commands SEND
Linked Control Properties Value TO
Selected Object A:B1
Selected Object Properties Value
Example 4
Sends the edit field's value to A:A34 whenever the user presses ENTER. Using Number_Value ensures that the entry is always stored as a value.
List Choose
On ON
Link Events Enter
Link Commands SEND
Link Control Properties Value TO
Selected Object A:A34
Selected Object Properties Number_Value
Example 5
If the edit field is named EditInteger3, this link command sets the edit field's maximum acceptable value to the current value whenever the user presses ENTER. This is handy for setting up an edit field that has no maximum value, but still has a minimum value (set by the Minimum property).
List Choose
On ON
Link Events Enter
Link Command SEND
Link Control Properties Value TO
Selected Object EditInteger3
Selected Object Properties Maximum
Linking file controls
Example 1
Sets the initial wildcard displayed by the file select control named FileCtrl6. All files with the extension .bdg are displayed.
List Control
On ON
Link Events Init
Link Commands SET
Linked Control Properties *.BDG TO
Selected Object FileCtrl6
Selected Object Properties Value
Example 2
Sets the initial directory displayed by the file select control named FileCtrl6 to FILES on the C: drive.
List Choose
On ON
Link Events Init
Link Commands SET
Linked Control Properties C:\FILES\ TO
Selected Object FileCtrl6
Selected Object Properties Value
Linking group boxes
Example 1
Sets the text of the label named Label5 whenever a different radio button in the group box is chosen.
List Choose
On ON
Link Events Valuechanged
Link Commands SEND
Linked Control Properties Value TO
Selected Object Label5
Selected Object Properties Label_Text
Linking scroll bars
Example 1 (Horizontal scroller link)
Sets the active cell to the scroll bar's value.
List Choose
On ON
Link Events Valuechanged
Link Commands SEND
Link Control Properties Value TO
Selected Object A:A1
Selected Object Properties Value
Example 2 (Horizontal scroller link)
Sets the initial value of the scroll bar to the value stored in A:C67.
List Choose
On ON
Link Events Init
Link Commands RECEIVE
Linked Control Properties Value FROM
Selected Object A:C67
Selected Object Properties Value
Example 3 (Vertical scroller link)
Sets the text color of the active cell (or cells) whenever the scroll bar's value is changed. Make sure the scroll bar is restricted to the range 0 through 15.
List Choose
On ON
Link Events Valuechanged
Link Commands SEND
Linked Control Properties Value TO
Selected Object A:A12
Selected Object Properties Text_Color
Linking list boxes
Example 1
Sets the list displayed to the cells stored as a label in cell A:A25 when the dialog box initially displays.
List Choose
On ON
Link Events Init
Link Commands RECEIVE
Linked Control Properties List FROM
Selected Object A:A25
Selected Object Properties Value
Example 2
Sets the list displayed to the cells stored as a label in cell A:A25 when another control uses the link command TRIGGER to generate the trigger event.
List Choose
On ON
Link Events Trigger
Link Command RECEIVE
Link Control Properties List FROM
Selected Object A:A25
Selected Object Properties Value
Example 3
Sets the title of the pick list button named PickList5 to Blocks when the dialog box initially displays.
List Choose
On ON
Link Events Init
Link Commands SET
Linked Control Properties Blocks TO
Selected Object PickList5
Selected Object Properties Label_Text
Linking radio buttons
Example 1
Displays the message stored in the cells A:A1..C3 whenever the radio button is selected by the user.
List Choose
On ON
Link Events Activate
Link Commands DOMACRO
Selected Object {MESSAGE A:A1..C3,0,0,0}
Example 2
Sets the initial text appearing by the radio button to whatever is stored in cell A:C3.
List Choose
On ON
Link Events Init
Link Commands RECEIVE
Link Control Properties Label_Text FROM
Selected Object A:C3
Selected Object Properties Value
Linking spin controls
Example 1
Sets the shading blend of the active cell or cells. Make sure the spin control is restricted to the range 0 through 6.
List Choose
On ON
Link Events Valuechanged
Link Command SEND
Link Control Properties Value TO
Selected Object A:A1
Selected Object Properties Value
Example 2
Sets the height of the rectangle named Rectangle2 whenever the spin control's value changes.
List Choose
On ON
Link Events Valuechanged
Link Commands SEND
Link Control Properties Value TO
Selected Object Rectangle2
Selected Object Properties Dimension.Height
Linking timer controls
Example 1
Tells the edit field named EditField6 to run any link commands attached to it that respond to the event trigger. Use this to create edit fields that constantly retrieve settings from the active object (cells, notebook, sheet, and so on).
List Choose
On ON
Link Events Timer
Link Commands TRIGGER
Selected Object EditField6
Selected Object Properties Trigger
Example 2
Displays a message stored in the cells A:A1..C3 when the time specified in the timer control's Alarm Time property is reached.