Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Retrieve minsize for use in ScrolledComposite
Retrieve minsize for use in ScrolledComposite [message #466787] Tue, 17 January 2006 17:40
Brad Reynolds is currently offline Brad ReynoldsFriend
Messages: 309
Registered: July 2009
Senior Member
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
( 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?

Previous Topic:mac requires win32 dll?
Next Topic:SWT table flickering
Goto Forum:

Current Time: Wed Sep 23 12:30:07 GMT 2020

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

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

Back to the top