FocusBehavior Attribute
Data Type: smallint
4GL Access: RW
The FocusBehavior attribute indicates the behavior of a menu item relative to the current input focus field. Use this attribute to determine whether clicking this menu item triggers events for the current field.
Valid values are:
FT_NOSETVALUE
Specifies that clicking this menu item does not trigger the SetValue event for the current field. This setting is useful for menu items that do not require any interaction with data, such as Help, or those that do not require data validation, such as Cancel.
FT_SETVALUE
Specifies that clicking this menu item triggers the SetValue event for the current field. However, since the focus remains in that field, there is no Exit field event.
This setting is useful for data validation tasks. For example, you could provide a Save menu item that activates a SetValue event block that validates the data in the field.
When you use this setting, OpenROAD activates the SetValue event for the current field only when the user has changed the data in the field. FT_SETVALUE is the default setting for all menu items.
FT_TAKEFOCUS
Specifies the same as FT_TABTO
FT_TABTO
Specifies that clicking this menu item triggers the SetValue and Exit events for the current field. If the current field is part of a composite field, you can use this setting to force validation and ChildExit events for the child fields. When you use this setting, OpenROAD always triggers the Exit event but only triggers the SetValue event if the user has changed data in the current field.
Descriptions of system constant values and their numeric equivalents are listed in
FocusBehavior Settings for ActiveField, ControlButton, and MenuItem.