|Retrieve minsize for use in ScrolledComposite [message #466787]
||Tue, 17 January 2006 17:40
| Brad Reynolds
Registered: July 2009
We have an RCP application that uses Wizards heavily. For the control portion of the wizards I'd like to embed them in a ScrolledComposite. For controls like Labels, Buttons, and basically anything that doesn't scroll on it's own I'm fine, but I run into issues with controls like Table when used in a GridLayout that fill and grab. The preferred size of these controls is the size that it will need to show all it's data without a scrollbar. What I'd like to be able to do is to ask from the Composite level what the minimum size is for that Composite. We're using the minimum size that can be specified in GridLayout for these controls but I can't see how I can get the minimum size in a layout agnostic way and I'm assuming this is because not all layouts provide the ability to specify a min size.|
The way I'm currently setting the minsize of the scrolledComposite is like snippet 166
( http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet166 .java)
because in most of our wizards we have wrapping labels as well but by asking for the preferred height I'm receiving the preferred height for Tables and Lists.
I've thought about just providing an API for my developers to be able to specify a ballpark size for their Composite (small, medium, large) and then provide a default min height according to the size but was curious if there was a better way. Any ideas?
Powered by FUDForum
. Page generated in 0.02323 seconds