FocusBehavior Attribute
Data Type: smallint
4GL Access: RW
The FocusBehavior attribute controls the behavior of the field relative to the input focus.
This attribute determines whether clicking this field causes the previous field to be exited and whether the Tab key moves the cursor to this field. Focus behavior has no meaning for composite fields.
Valid values include:
FT_TABTO
Specifies that the field accepts the input focus and is part of the tabbing sequence for the fields on the form (the Tab command stops at the field). A tab into a field highlights the field. The tabbing sequence for the form is determined by a left-to-right, top-to-bottom order of fields.
If the field is a single-line entry field, FT_TABTO also sets pending delete on. (Pending delete means that if the user begins to enter information in the field, the existing value in the field is deleted, making way for the value being entered.)
FT_TABTO is the default setting for single-line entry fields.
Placing a multiline entry field into the tabbing sequence lets the user tab into the field. However, to exit, the user must still use the mouse or the Shift+Tab key combination to select another field. Multiline entry fields do not have pending delete.
FT_TAKEFOCUS
Specifies that the field can accept the input focus but is not part of the tabbing sequence (the Tab command does not stop at the field). When the user clicks a field with this focus behavior setting, OpenROAD automatically exits the field that currently has the input focus and moves the focus to the field that was clicked.
FT_TAKEFOCUS is the default setting for multiline entry fields.
FT_SETVALUE
Specifies that the field is not part of the tabbing sequence and does not accept the input focus. If the end user clicks a field with this focus behavior setting, OpenROAD does not move the input focus away from the field that currently has it, but does process the SetValue event for that field.
This setting is useful for fields that perform data validation tasks. For example, you could provide an OK button with this setting so that, when the user clicks the button, OpenROAD processes a SetValue event for the current field that checks the validity of its data.
OpenROAD triggers the SetValue event only if the user changed the data in the current field. Also, since the current field is not exited, no Exit event for the current field is activated.
Note: You cannot define Entry or Exit events for fields with a FocusBehavior setting of FT_SETVALUE.
FT_SETVALUE is the default setting for all form fields other than entry fields.
FT_NOSETVALUE
Note: Specifies that the field is not part of the tabbing sequence, cannot take the input focus, and does not force the SetValue event processing on any field that has the input focus.
This setting is useful for buttons such as Cancel or Help, when you do not need to check the current data in the field.
Note: You cannot define Entry or Exit events for fields with this setting, only Click and SetValue events.