|How to limit Label control height? [message #775948]
||Sat, 07 January 2012 01:36
| John Lussmyer
Registered: December 2010
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?
Powered by FUDForum
. Page generated in 0.01915 seconds