static Size getTextExtent(String textString)
_INSERT_METHOD_SIGNATURE_HERE_
Description:
Parameter | Description |
---|---|
textString | text string to measure |
this method returns:
Returns | Description |
---|---|
static Size | size of the text string |
This method returns the extent of a text string when drawn with the current font. The Size return type delivers the height and width values of the textString.
Note
Example
Size sizeOfTextString = Control.getTextExtent("Hello World!");
int height = sizeOfTextString.getHeight();
int width = sizeOfTextString.getWidth();
Alternatively a value can be optained with a single call:
int height = Control.getTextExtent("Hello World!").getHeight();
int widht = Control.getTextExtent("Hello World!").getWidth();
See also:
Size
Draw.writeText(String)
Draw.writeASCIIText(String)
Control.getUnicodeTextExtent(String)
Control.getTextMessageExtent(int)
Copyright © demmel products gmbh. All rights reserved.