Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to limit Label control height?
How to limit Label control height? [message #775948] Sat, 07 January 2012 01:36
John Lussmyer is currently offline John LussmyerFriend
Messages: 100
Registered: December 2010
Senior Member
I have a Label control that will be displaying just 1 line of text, 90% of the time.
Another 9% will be 2 or 3 lines.
Having it resize itself for those cases is just fine.
It's the odd rare case when it is given 20 lines of text that I have a problem with.
I'd like to be able to limit it to 3 lines height, and if it needs more space, then add a vertical scroll bar.
Seems like putting it in a Composite would do this, but I don't see any easy way of telling when it's getting too tall so I can turn on the scroll bar. There also doesn't seem to be a max size setting.

Anyone have code to do this?
Previous Topic:Dynamically add/remove columns from a table?
Next Topic:How to add a browser editor in RCP ?
Goto Forum:

Current Time: Mon Nov 23 16:23:41 GMT 2020

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

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

Back to the top