Hi,
I wander if it's possible to find the width of the test, which I want to display in the TextItem
Right now I use some hard-coded LINK_MAX_WIDTH value, but I wanted to find the real size of the
in order to set the TextItem to display only this string and not to be too big or too small for the text.
Do I have a way to know the size of the text (in pixels obviously) ?
I wander if it's possible to find the width of the test, which I want to display in the TextItem
Code:
private final static int LINK_MAX_WIDTH = 420; private void initLink( final TextItem link, final String linkTitle) { link.setEndRow( true ); link.setShowTitle( false ); link.setValue( linkTitle ); link.setColSpan( 1 ); link.setWidth( LINK_MAX_WIDTH ); link.setCanEdit( false ); link.setCanFocus( false ); }
Code:
String linkTitle
Do I have a way to know the size of the text (in pixels obviously) ?
Comment