Attaching actions to dialog box controls

After you add a control to a dialog box, you must specify what happens when a control executes an action or result. A control can execute when triggered by an action or when triggered by another control’s actions. There are two ways to activate a control: by connecting it or by linking it.

You would connect a control to create a static or dynamic connection to a spreadsheet. For example, if you want the list in a list box to display a list of current customers, then a dynamic connection is appropriate, as it reflects the most recent data in the connected column on the spreadsheet. You should link a control to create a more complicated link. For example, you can create a compound link (a link containing several link actions for a control) or a conditional link (a link using an IF condition).

You can connect a control to another control or to a notebook cell. This creates a link command for the selected object.

You can specify actions for a control to perform in the Object link dialog box. You can assign a single link or consecutive links to a control. The links execute in the order they display.

The list types in the Object link dialog box from which to select are:

List
Description
Link events
Displays the specific event that triggers the link command
Link commands
Displays the command (action) that sends a value to another control or notebook cell, runs a macro, or runs another event in response to a triggering event
Link control properties
Displays available properties for the control
Object selector list
Allows you to specify a control or cell on which to act
Selected object properties
Displays properties for the item selected in the Object selector list

You can create conditional links by using the IF-THEN-ELSE link command. An IF-THEN-ELSE link command compares a minimum of two conditions and tests if the results are true. If the conditions are true, the THEN part of the link command occurs. The ELSE portion of the link command occurs if the result is false, so that the second IF link command occurs. For example, you can create a group box with three radio buttons, and link the radio buttons to two edit boxes that display different results depending on which radio button is selected.

You can delete a connected link command.

For examples of how to link dialog box controls, see “Examples of linking controls.”

For information about the kinds of link events and link commands available, see “Understanding link events” and “Understanding link commands.”


To connect a dialog box control to cells or other controls

Wordperfect Quattro Pro btnbacktotopproc Attaching actions to dialog box controls
1.
 
Click the Quick tab Wordperfect Quattro Pro pgx btnsptab Attaching actions to dialog box controls button at the bottom of the application window to display the Objects sheet.
2.
 
Double-click a dialog box.
3.
 
Select a control.
4.
 
Right-click the control, and click Connect.
5.
 
Type the cell reference in the Target field.
If you want to immediately send control value changes to a cell or another control, enable the Dynamic connection check box.

Wordperfect Quattro Pro note Attaching actions to dialog box controls

 
The Dynamic connection check box is enabled by default; disable this box if you want to display control value changes to a cell or another control only when you close the dialog box.
 
You can access the Connect command through the Object link dialog box when you are in Developer mode. For more information about Developer mode, see “Working in Developer mode.”

To specify the action performed by a dialog box control

Wordperfect Quattro Pro btnbacktotopproc Attaching actions to dialog box controls
1.
 
Click the Quick tab Wordperfect Quattro Pro pgx btnsptab Attaching actions to dialog box controls button at the bottom of the application window to display the Objects sheet.
2.
 
Double-click a dialog box.
3.
 
Select a control.
4.
 
Right-click the control, and click Links.
5.
 
Click one of the following buttons:
Add — creates a link below the active link
Insert — creates a link above the active link
6.
 
From the Link event list, choose the event that initiates the action.
7.
 
From the Link command list, choose the action to perform.
8.
 
Choose an option from any of the available lists.

Wordperfect Quattro Pro tip Attaching actions to dialog box controls

 
You can assign consecutive link commands for the control by repeating steps 3 through 6 of the above procedure.

To create a conditional object link

Wordperfect Quattro Pro btnbacktotopproc Attaching actions to dialog box controls
1.
 
Click the Quick tab Wordperfect Quattro Pro pgx btnsptab Attaching actions to dialog box controls button at the bottom of the application window to display the Objects sheet.
2.
 
Double-click a dialog box.
3.
 
Select a control.
4.
 
Right-click the control, and click Links.
5.
 
Click Add.
6.
 
From the Link event list, choose the event that initiates the action.
7.
 
Choose If from the Link commands list.
8.
 
Choose an option from any of the available lists.

To delete a connected link command

Wordperfect Quattro Pro btnbacktotopproc Attaching actions to dialog box controls
1.
 
Click the Quick tab Wordperfect Quattro Pro pgx btnsptab Attaching actions to dialog box controls button at the bottom of the application window to display the Objects sheet.
2.
 
Double-click a dialog box.
3.
 
Select a control.
4.
 
Right-click the control, and click Links.
5.
 
Click one of the following:
Delete — deletes the selected link in the Object link dialog box
Delete all — deletes all links displayed in the Object link dialog box

Attaching actions to dialog box controls