Element attributes

Select Edit Attributes from the pop-up menu for elements to edit an existing attribute or add a new one. The attributes that display include all the default attributes for the elements with any template changes applied. The name attribute (and in some cases the class attribute) used to identify the element is omitted and cannot be changed.

The sample shows the Element Attributes dialog box with the Element d _ dept _ list displayed. Under the element is an attributes box that lists the dept and dept _ head _ i d attributes. For dept, no control reference is displayed, but the Text value is set at 0. For dept _ head _ i d, the Control Reference value of dept _ head _ id has been selected from the drop down list. Expression buttons appear to the right of the two attributes.

You can change or delete the default attribute values or add new ones. Controls or expressions can also be referenced for element attribute values.

For each attribute specified, you can select a control reference from the drop-down list or enter a literal text value. A literal text value takes precedence over a control reference. You can also use the expression button to the right of the Text box to enter an expression.

The expression button and entry operates similarly to DataWindow object properties in the Properties view. The button shows a green equals sign if an expression has been entered, and a red not-equals sign if not. A control reference or text value specified in addition to the expression is treated as a default value. In the template, this combination is stored with the control reference or text value, followed by a tab, preceding the expression. For example:

attribute_name=~"text_val~~tdw_expression~"

When you finish modifying element attributes and you click OK, only changes are stored in the template. Default attributes that are deleted are added in the template and marked with an empty value.