Language Reference Guide : 4. System Classes : EntryField Class : CharsPerLine Attribute
 
Share this page                  
CharsPerLine Attribute
Data Type: integer
4GL Access: RW
The CharsPerLine attribute specifies the number of average-width characters per line that the entry field can contain.
OpenROAD multiplies the value of this attribute by the average width of a character in the font currently specified for the field to obtain the specific width of the field, unless the UseWidestCharacter attribute is TRUE. If you change the font, OpenROAD adjusts the width so that the specified number of characters is still displayed.
With the exception of Courier, character widths in fonts vary. Because some characters are wider than the average, setting this attribute does not guarantee that any string of the given number of characters fits within the field without scrolling. For example, if you set CharsPerLine to 12, a string of 12 W's might not fit without scrolling.
The size of an entry field is always rounded to a whole number of lines and characters per line. Consequently, when you set the Width and Height attributes for an entry field, OpenROAD uses the current setting of the field's font attributes to calculate the closest integral number of lines and characters per line for the field. It adjusts the actual Width and Height attributes to match those calculations. This approach makes the fields more portable across window systems.