Single-line edit
In order to define a single-line edit control, the control should be associated with an edit style. As default style for single-line edits, _lineedit style is provided in the resource database after initializing GUI resources. In order to create, update or browse edit styles, one may select Objects/Styles/Edit.
For several data types (CHAR, STRING, INT, UINT, REAL), _LineEdit controls (ADK_FieldControl) are provided in the resource database, which are used as default when creating a field.
In order to create a control with hidden input, the Password switch should be set. The Upper switch causes key input in the field to be translated into upper case letters.
Typically, single-line edit fields are used to display data for (short) text fields, i.e. the data source for single-line edit fields is a text property.
Single-line edit fields are not limited in size. Thus, content entered in a single-line edit field might be cut, when it becomes to long,
Single-line edit fields are also used for displaying referenced instances. When assigning a reference or relationship data source to a single-line edit field, the field displays the primary key by default. When no primary key is available, the complete instance will be displayed.
When assigning references or relationships to the data source of a single-line edit fields, auto-position should be set in the data source in order to select the the referenced instance automatically.
When entering a new key in the single-line edit, the referenced instance will be replaced by the instance identified by the key entered in the field. When no such instance could be located, a new instance will be created. Typically, however, single-line edit controls should be read only (access_mode = Read) when referring to references or relationships. In order to update a reference, a combo drop list control might be used.
One should use this feature only for singular references or relationships with a primary key. Especially when changing the value in the single-line edit field, referring to multiple collections may cause strange effects.
A drop combo box contains a single-line edit field on top of the drop list that shows the current value of the data source. For relationships, the drop lists displays the instances from the relationships base collection. In order to change the referenced instance, one may pick up an item from the list and the new link will be created. In order to assign a new instance to a reference or relationship, one may enter the key for the new instance in the single-line edit.