Common Tasks for Control Parts

The following tasks are common among control parts:

Changing the depth order of controls
The depth order of controls determines the order in which they are reached using keyboard cursor keys. To change the depth order of controls in a composer part, open its pop-up menu and select View parts list. Then, in the parts list window, drag parts to the new positions you want.

Defining a control group
You can define control parts as a group to enable cursor movement among the controls. The user can cycle forward or backward through the controls in a group using the keyboard cursor keys. You will probably also want to define the first control in the group as a tab stop.

Before you define a control group, make sure that the controls are in sequential depth order. You can verify their order in the parts list for the composite part. If the controls are in either a group box or an outline box, the box should precede the first control in the group.

To define a control group, set the group style to on for the first control in the group and for the first control following the group. Leave the group style set to <default> or set it to off for all other controls in the group. To set the group style for a part, do either of the following:

Defining a tab stop
To allow the user to reach a control part by using a tab key, set the tabStop style to on. To set the tabStop style for a part, do either of the following:

Adding a pop-up menu
To add a pop-up menu for a control part, do the following:
  1. Drop an IMenu* part on the free-form surface.
  2. Connect the IMenu* this attribute to the menu attribute of the control part.

Identifying a help panel
To link a control with its help panel, set the helpId property in its property sheet. Enter the help panel ID in the value column. The panel ID is the resource number specified for the the help panel heading.

Defining fly-over text
Fly-over text provides information about a control part when the mouse pointer hovers over the part. Define fly-over text for each control part in its own property sheet, not in the property sheet for the IVBFlyText* part. You can define either or both of the following types of fly-over text for a part.

Short fly-over text
Short fly-over help text is displayed in a pop-up caption box near the mouse pointer. To define this text, set the Fly-over short text property. Enter the text in the value column.

Long fly-over text
Long fly-over information is displayed in a text control that you specify. To define this text, set the Fly-over long text property. Enter the text in the value column.

Disabling a control
To disable a control part when an event occurs, connect the event to the disable action of the part.

Enabling a control
To enable a control part when an event occurs, do the following:
  1. Connect the event to the enable action of the part.
  2. The enable action enables the part by default. If you have changed this default, open settings for the connection, select Set parameters, and set the parameter value to true.


Related procedures
Opening the Property Sheet for a Part
Changing Depth Order within a Composite Part
Setting Tab Stops and Groups
Providing Drag and Drop Support
Working with VisualAge User Interface Parts