Editing Marked Text Fields

When marked text fields are used in an editable Text Control and these fields are editable, the end-user can alter the contents of the field like any other text. Because it is not always unique whether the current input position is or is not inside a field some field attributes have been implemented to help the end-user to edit fields. These attributes can be used in any combination and must be set with the FieldEditAttr property.

When the current input position is in front or behind a field the next inserted character can either belong to the field or to the text outside the field. In normal editing mode an inserted character has the attributes of its preceding character which means that inserted text just behind a field belongs to the field and inserted text in front of a field does belong to the text in front of the field. To solve these problems extended editing features can be defined for every field with the FieldEditAttr property. It implements a second input position at the beginning and the end of the field. The end-user can switch between the two positions with the left and right arrow keys. This is especially important when a marked text field is at the beginning or the end of the complete text. For example when a field is at the end of the text the end-user can press CTRL+END to reach the text end. When this position is also the end of a marked text field the right arrow key can be pressed when the next inserted character should not belong to the field.

To help the end-user to find the correct position, additional settings can be performed which change the caret's width when it is inside a marked text field or display the complete text of a field with a gray background when the current input position is inside this field.

Each of the described attributes can be defined for a single field in any combination which means that different kinds of marked text fields can be implemented in a single Text Control.