Migration Guide : E. Features Introduced in OpenROAD 6.2 : Changes to Existing Features : EntryField Margins Now Adjustable
 
Share this page          
EntryField Margins Now Adjustable
Formerly, EntryFields had hardcoded margins of two pixels on each side, which is insufficient for backgrounds with borders and rounded corners. The FieldObject system class now includes four new attributes that enable you to set individual margins for a field (default settings are the current margin):
BottomInnerMargin
Data Type: integer
4GL Access: RW
Defines the lower margin in pixels between the field border (if any) and the data area
LeftInnerMargin
Data Type: integer
4GL Access: RW
Defines the left margin in pixels between the field border (if any) and the data area
RightInnerMargin
Data Type: integer
4GL Access: RW
Defines the right margin in pixels between the field border (if any) and the data area
TopInnerMargin
Data Type: integer
4GL Access: RW
Defines the top margin in pixels between the field border (if any) and the data area
The "data area" differs for different field types. For example, for EntryFields (the only field type addressed in this release), ButtonFields, and OptionFields, it refers to the text area. For ToggleFields it refers to the indicator, plus text. For ImageFields it refers to the displayed bitmap area.
Each margin is a single setting for any given field. For example, multiline EntryFields will have the same inset for each line. But individual margin settings provide a useful way to indent blocks of text in a variety of situations.
Note:  Changing any of these attributes affects the corresponding field size attributes, except where ExactWidth or ExactHeight are set: these retain their physical dimension. In this case, the new margins are applied to the existing text areas.
For more information, see EntryField Class in the Language Reference Guide.