Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Maximum width of a control?
Maximum width of a control? [message #901588] Mon, 13 August 2012 10:34
Libor Jelinek is currently offline Libor Jelinek
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hi everybody,
it is possible to set a maximum width of a control? To speak namely I
have Label with very long text that is wrapped inside parent composite:

Label lblLongLabel = new Label(container, SWT.WRAP);
lblLongLabel.setText("very very very long text in size approx of a few
paragraphs");

I don't want to set fixed size except maximum width. Height should be
real height of wrapped label text.

Unfortunatelly calculated width is always screen resolution maximum
which is very awkward.

Google didn't helped me a lot. I don't want to listen "write your own
layout" :-) but AFAIK there's no feature like "maximum width".

Thanks a lot
Libor
Previous Topic:Selection Listener on TabFolder executing five times on each click?
Next Topic:SWT Browser window displays incorrectly after exporting
Goto Forum:
  


Current Time: Fri Aug 22 11:55:15 EDT 2014

Powered by FUDForum. Page generated in 0.03788 seconds