Drawing Property Controls
A property control displays a item property on a form. Property controls are simple controls that are directly linked to a property for a item, display the current value for the property, and optionally enable the user to select a new value for the property. A property may appear more than once within a form, as long as each instance appears on a separate tab. A property may appear at most once on any single tab within the form.
You can create the following property controls from the Tools Palette:
- Create default property controls
- Create customized property controls
- Create Static Text property controls
- Create Radio Set property controls
- Create Check Box property controls
- Create Text Field, Text Area, Combo Box, or List property controls
- Create Time property controls
- Create Browse Button property controls
- Create run command Browse Button property controls
To create default property controls, do the following:
- Click the Properties tab in the Controls pane. The Properties tab displays a list of all available properties for the item type.
- Select the property that you want to display on the form, then drag your selection onto the form and drop it in an appropriate location. The default control for that property displays on the form.
To create customized property controls, do the following:
- Click the appropriate button on the Tools Palette. The mouse pointer changes to a cross-hair.
- Click and drag to draw the control on the form. A dialog box opens so you can select the item property to associate with the control.
- Select the property to be exposed by the control, enter any control-specific information, and click OK.
Note: The buttons on the Tools Palette represent the simple control properties that you can add to the form.
See the sub-procedures that follow about the available property controls for specific information on each control.
To create Static Text property controls, do the following:
- Click the Static Text Control button on the Tools palette, then click the Form Layout Area, and drag to draw the control on the form. The Create New Control dialog box opens.
- Select the property to be exposed by the control, and leave the Display caption only check box unchecked.
- Click OK.
To create Radio Set property controls, do the following:
- Click the Radio Set Control button on the Tools Palette, then click the Form Layout Area, and drag to draw the control on the form. The Create New Control dialog box opens.
- Select the property to be exposed by the control, and click OK. The Add Radio Controls dialog box opens.
You must create at least two radio controls for a radio set control.
To create the radio controls within the radio set, do the following:- Type the caption text for the button.
- Select the value to which the property will be set when the control is selected.
- Click Next to create another control and repeat.
- Click Finish when you have created the necessary controls.
Note: After you have created a radio set and have associated display text with the radio controls, you cannot edit either the display text or the associated values using the Layout Designer. Instead, you must delete the control and create a new one.
To create Check Box property controls, do the following:
- Click the Check Box Control button on the Tools Palette, then click the Form Layout Area, and drag to draw the control on the form. The Create New Control dialog box opens.
- Select the property to be exposed by the control, and click OK. The Select State Values dialog box opens.
- Select the values to be associated with the check box in its checked and unchecked states, and click OK.
Note: After you have created a check box and have associated a property value to its checked and unchecked states, you cannot edit the associated values using Layout Designer. Instead, you must delete the control and create a new one.
To create Text Field, Text Area, Combo Box, or List property controls, do the following:
Click one of the following buttons on the Tools Palette:
- Text Field Control
- Text Area Control
- Combo Box Control
- List Control
- Click the Form Layout Area, and drag to draw the control on the form. The Create New Control dialog box opens.
- Select the property to be exposed by the control, and click OK.
Tip: Tip: Create an associated Label control to describe the field and provide an access key target. You can create a Label control using the Label Control button on the Tools Palette.
To create Time property controls, do the following:
- Click the Time Control button on the Tools Palette, then click on the Form Layout Area, and drag to draw the control on the form. The Create New Control dialog box opens.
- Select the property to be exposed by the control, and click OK.
To create Browse Button property controls, do the following:
- Create a text field control and select the property it is to expose. This is the same property (file path or folder path) that is to be attached to the browse button.
- Click the Browse button on the Tools Palette, then click in the Form Layout Area, and drag to draw the control on the form. The Create New Control dialog box opens.
- Select the button type (either Browse File Button or Browse Folder Button) and the property that displayed by the text control created in step 1, and click OK.
To create run command Browse Button property controls, do the following:
- Create the executable, if necessary, and associate it with a StarTeam item property.
- Click the Browse button on the Tools Palette, then click in the Form Layout Area, and drag to draw the control on the form. The Create New Control dialog box opens.
- Select Run Command Button as the control type and the property that contains the command name as its value, and click OK.