Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Wizard page - when to use pack()?
Wizard page - when to use pack()? [message #629368] Tue, 28 September 2010 01:28 Go to next message
Larry Edelstein is currently offline Larry EdelsteinFriend
Messages: 25
Registered: July 2009
Junior Member
My wizard isn't rendering correctly in Eclipse 3.6.1. It's leading me to wonder: when does one have to use Composite.pack()? Some SWT examples have it, and some don't.

How the wizard pages renders depends on the target platform. If I run my plugins in 3.5.2, they render correctly as soon as I open them. But in 3.6.1, their contents areas are blank when they first one. The pages use GridLayout.

If I use the mouse to resize the wizard dialog, it immediately renders just fine.
If I call pack() on the control that I pass to DialogPage.setControl(), the page renders, but it's not quite wide enough. A subsequent resize fixes the width.

Can someone shed some light? Is there a general rule for when to use pack()?

Larry Edelstein
Sr. Member Tech Staff
Salesforce.com
Re: Wizard page - when to use pack()? [message #629730 is a reply to message #629368] Wed, 29 September 2010 11:57 Go to previous message
Lakshmi P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
Hi,

You can use Composite.pack() when you want your composite to be resized to its preferred size. But its preferred size is computed from its layout.
This article could be useful --> Understanding Layouts


Lakshmi P Shanmugam
Previous Topic:Disable expand all tree nodes on asterisk (*) in windows
Next Topic:Virtual SWT tables behaving very slowly on linux platforms
Goto Forum:
  


Current Time: Thu Apr 25 15:57:49 GMT 2024

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

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

Back to the top