Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » JFace dialog button bar doesn't show until dialog is resized
JFace dialog button bar doesn't show until dialog is resized [message #484972] Thu, 10 September 2009 04:08 Go to next message
Eclipse UserFriend
Originally posted by: crni.adjah.gmail.com

Hi,

I extend a JFace dialog to make my own. First I implement the
createDialogArea
method, and add all of the components that I want the dialog to contain.
Since
I want the dialog to be a certain size (450x450p) at the end of
createDialogArea I call these two methods:
shell.setSize(400, 400);
shell.layout();

where the shell is acquired at the beginning of the method like this:
Composite composite = (Composite)super.createDialogArea(parent);
shell = composite.getShell();

when the dialog opens, dialog area shows fine but the OK and cancel buttons
don't until i re size the dialog a little and then it's all fine.

Thanks in advance for any help with this, I tried everything and can't
find an
acceptable solution.
Re: JFace dialog button bar doesn't show until dialog is resized [message #485243 is a reply to message #484972] Thu, 10 September 2009 22:08 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
On Thu, 10 Sep 2009 04:08:15 +0000, NC wrote:
> Thanks in advance for any help with this, I tried everything and can't
> find an
> acceptable solution.

For newsgroup/forum readers that are curious about this thread, please
refer to bug 289029.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=289029

Regards,
Remy
Re: JFace dialog button bar doesn't show until dialog is resized [message #485260 is a reply to message #484972] Fri, 11 September 2009 01:33 Go to previous message
NC  is currently offline NC Friend
Messages: 8
Registered: September 2009
Junior Member
To sum up all all that Remy said in that bug:
the reason my two lines of code didn't work (call to setSize() and
layout() methods of the shell) is because the button bar containing ok and
cancel buttons doesn't exist at the time of the call. It does what it is
supposed to do but only with dialog area that is created.
Once again thank you Remy for your help.
Previous Topic:Is it possible to open the SWT FileDialog in the details view
Next Topic:Updating custom Marker View
Goto Forum:
  


Current Time: Thu Nov 27 23:22:37 GMT 2014

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

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