Making attribute values end-user configurable
You might want to allow the users of your dynamic component to configure some values of your dynamic component, such as the spacing between pickets in a fence or the width of your stairs. Values that are configurable will appear in a Component Options dialog box accessible from the component's context menu. To make a value configurable:
- Context-click on the component. The component's context menu is displayed.
- Select the Dynamic Components > Component Attributes menu item. The Component Attributes dialog box is displayed. Notice that the top-level component is listed.
- Click the + button next to the component's name. A list of attributes appears for the component.
- Click on the Details button to the right of the attribute you want to make end-user configurable. A drop-down list of display rules appears. There are two display rules allowing users to configure the attribute: 'Users can edit as textbox' and 'Users can select from a list.' This article explains how to configure the more complex display rule: 'Users can select from a list."
- Select Users can select from a list. The Display label and a table appear. The following image shows the Display rule drop-down list, Display label field, and table.
- Type a label in the in the 'Display label' field. This field contains the user-friendly name you want to appear in the configuration box for this attribute.
- Click the add option icon in the List Option column of the table. A row is created with the field in the List Option column open for edit.
- Type
Small
in the 'List Option' field. This text will appear in a drop-down list in the Configure Options dialog box. - Press the Tab key.
- Type
1
in the 'Value' field. - Press the Tab key to accept the value.
- Repeat steps 7 through 11 using the option and value pairs of:
- Medium , 2"
- Large , 3
- Extra Large , 4
- Click on the Apply button. The attribute details panel closes.
- Click on the Close button. The Component Attributes dialog box closes. The user of this component can now configure the component's Slat Spacing attribute using the Configure Options dialog box. Refer to Configuring a Dynamic Component for further information.
The following image shows the attribute details panel with all completed fields: