User defined properties
An user defined property is a typed variable that belongs to an element. These properties are defined in the External fields section on the Advanced tab. The following format should be observed:
Type1 Name1;
...
TypeN NameN;
where Name is the name of the variable and Type is its type.
When fields are created, they are initialized as follows: numerical fields are initialized with zero values, rectangles and regions are initialized with empty values, etc.
Fields may be used in the element to which they belong and in any of the elements located below their element. The value of a field can be changed only in the element to which it belongs, and in other elements it is available as read only.
The value of a complex expression that characterizes the hypothesis for an element may be computed and written into this property. This value may be accessed from any of the elements below, without computing it each time it is needed. This reduces the time required to match the FlexiLayout. obviates the need to copy a large expression into each of the elements, and makes the code more readable.
To access a field of an element, the full name of the field is used in the following format: ElementName.FieldName (e.g. SearchElements.StaticText1.x). Within an element, its field may be accessed by name: x. In the case of a compound element, its subelements (at any level of nesting) may also access its elements by their short names.
Within an element, the names of the fields must be unique. The names of elements of a compound element may not coincide with any of the field names in its subelements (at any level of nesting). Additionally, the names of the fields of a compound element may not coincide with any of the names of its subelements.
Example
Note.Because of the fields, elements of the same type are not treated as identical. Thus, constructions of the following type are prohibited:
Let e = SearchElements.StaticText1;
e = SearchElements.StaticText2;// element of the same type
12.04.2024 18:16:02