Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Wizard page - when to use pack()?
Wizard page - when to use pack()? [message #629368] Mon, 27 September 2010 21:28 Go to next message
Eclipse UserFriend
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 07:57 Go to previous message
Eclipse UserFriend
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
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: Sat Jul 05 08:01:04 EDT 2025

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

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

Back to the top