Example: Creating Common Form Controls

In this example, we will give instructions for creating each of the most common controls for presenting attributes on your forms.

The following form contains many of the most commonly-used controls for presenting attributes in your forms:
Custom Form Attribute Control Styles.gif

To create a control, you must create an extended attribute (see Extended Attributes (Profile)) and then add it to the form (see Adding Extended Attributes and Other Controls to Your Form). You can organize your controls by using horizontal and vertical layouts, dividers, spacers, free text and groupboxes. PowerDesigner will automatically add appropriate supplementary tools to your controls, such as the Create, Delete, Select, and Propeties tools to the right of an object control.

To create the controls shown:
Control Requires
Single-line text Select the String, Password (masks entered values), or Float, Hex, or Integer data type for your attribute.
Read-only Select any data type, check the Computed and Read only (Get method) options and enter the necessary script to calculate the value that will be displayed.
Multi-line rich text Select the Text data type and the RTF text format. You can select a number of other text formats to display various types of code or plain text.
Checkbox Select the Boolean data type. Use the Default value field to specify whether the checkbox should be selected or not by default.
Radio Buttons Select any appropriate data type, enter a list of values, and select the Complete option. When adding your attribute to the form, select either horizontal or vertical radio buttons from the Display option.
File, Date, or Color Picker Select the File, Date, or Color data type.
Choose value from list or Enter or choose value Select any appropriate data type and enter a list of values to allow the user to select a value from the list or enter their own value. Select the Complete option to force the user to select from the list.
Choose object Select the Object data type and then select an object type and optionally an object stereotype (see Linking Objects Through Extended Attributes).