Package ilcd
Class Attribute
Public Method setUnderlinePosition
static void setUnderlinePosition(int position)
Throws:
_INSERT_METHOD_SIGNATURE_HERE_
Description:
Parameter |
Range |
Description |
position |
-32 ... 31 |
underline position |
Sets the vertical position for the underline.
Note
- Underline Position is only relevant when Underline Mode is activated (see Attribute.setUnderlineModeEnabled(boolean)).
- Setting a font (see Attribute.setFont(int)) causes position automatically to be reset to 0.
- The default value for position is 0. It will be automatically set to default on startup and by the methods General.resetAll() or General.rebootPanelController().
- If the current vertical font spacing is 1 (see Attribute.setFontSpacing(int, int)), any value greater than 0 for position causes the underline not drawn anymore as it would overwrite parts of next line.
- Using a negative value for position will cause the line to be drawn within the character area (thus crossing out instead of underlining the character).
- If position would cause overwriting parts of the previous line (depending on the font height), underlining is not carried out anymore.
Attribute.setUnderlinePosition(2);
This example sets the underline position to 2 pixels below the text.
See also:
Copyright © demmel products gmbh. All rights reserved.