|
Re: CSS & Layouts [message #1384816 is a reply to message #1384799] |
Mon, 02 June 2014 09:50 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
I'm not 100% but could you try to register an SWT-Listener who listens
to SWT.Skin?
Tom
On 02.06.14 09:15, Peter Kullmann wrote:
> How can I calculate some layout sizes based on the font size of the
> widgets, eg size columns in table widgets or the width and height of
> text widgets depending on the widgets fonts?
> For example, consider this (old code):
>
> Text text = new Text(parent, SWT.NONE);
> text.setFont(textFont);
> int averageCharWidth =
> textFont.getFontData()[0].getFontMetrics().getAverageCharWidth();
> GridDataFactory.fillDefaults().hint(30 * averageCharWidth,
> SWT.DEFAULT).applyTo(text);
>
>
> In e4, I will not set the font directly, it will be applied later by the
> css engine. How can I size the control?
>
> Thanks, Peter
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02982 seconds