Skip to main content


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 14:34
Libor Jelinek is currently offline Libor JelinekFriend
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 Apr 19 19:28:57 GMT 2024

Powered by FUDForum. Page generated in 0.02859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top