Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Wizard test
Wizard test [message #921068] Sun, 23 September 2012 19:55 Go to next message
Bertin Kiekebosch is currently offline Bertin Kiekebosch
Messages: 306
Registered: August 2011
Senior Member
Hi,

I tried to use the wizard and have some problems with it:

If I start the wizard it comes up at full screen size. I like to have it smaller but don't see how. Then the previous and next buttons are at the bottom of the screen. When I use the next or previous button, the screen gets even bigger, so the next and previous button move off the screen so I can't use them anymore.

Any hint how I should use it.
Re: Wizard test [message #921521 is a reply to message #921068] Mon, 24 September 2012 07:27 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 127
Registered: March 2010
Senior Member
Hi Bertin,

This sounds like a layouting problem to me. Please check the gridH and gridW properties of the fields on your wizard forms to make sure the fields are not too big. Does the same thing happen if you just open the form without the wizard?

Btw: When using wizards as dialogs I suggest setting a fixed height and width so that the dialog does not change it's size when stepping next and back. This needs to be done on the mainbox of the wizard container form, see also IWizard#execCreateContainerForm().

Hope it helps
Claudio
Re: Wizard test [message #923052 is a reply to message #921521] Tue, 25 September 2012 15:09 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin Kiekebosch
Messages: 306
Registered: August 2011
Senior Member
Hi Claudio,

The forms contain just one field. If I open them seperately they are very small.

I can get the mainBox, inside the method execCreateContainerForm but have no idea how to set a fixed height and width then. Do you have a code example.

Regards Bertin
Re: Wizard test [message #929438 is a reply to message #923052] Mon, 01 October 2012 13:09 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 127
Registered: March 2010
Senior Member
Hi Bertin,

The reason why the wizard is so big can be found in the DefaultWizardContainerForm:

@Override
protected int getConfiguredGridH() {
  return 32;
}


Do you have a small screen resolution? The wizard probably is too big for your screen. It seems that the size gets automatically corrected when the dialog opens so that it fits to the screen. But when changing the step, a relayouting is done which does not consider the screen size anymore. But this is just a guess, I haven't analyzed it further.

You may now change the gridH to a smaller value or directly set width and height in pixel, as already mentioned. To do that you can either use the DefaultWizardContainerForm as template, copy it to your project and change what you need. Or you can do it directly in the wizard:

@Override
protected IWizardContainerForm execCreateContainerForm() throws ProcessingException {
  IWizardContainerForm f = super.execCreateContainerForm();

  GridData gd = f.getRootGroupBox().getGridData();
  gd.widthInPixel = 400;
  gd.heightInPixel = 400;
  f.getRootGroupBox().setGridDataInternal(gd);

  return f;
}


Hope it helps.
Claudio
Re: Wizard test [message #929529 is a reply to message #929438] Mon, 01 October 2012 14:42 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 765
Registered: October 2011
Senior Member
Claudio Guglielmo wrote on Mon, 01 October 2012 15:09
It seems that the size gets automatically corrected when the dialog opens so that it fits to the screen. But when changing the step, a relayouting is done which does not consider the screen size anymore. But this is just a guess, I haven't analyzed it further.


I experienced something a similar in my Scout Application (Swing - Scout Version from Jan-2012).

The bug with a minimal example can be found here: Bug 372222

Have also a look of the code Snippet proposed by Ken Lee. It ensures that the screen bounds are considered when a Form is resized.


[Updated on: Thu, 04 October 2012 11:08]

Report message to a moderator

Re: Wizard test [message #932666 is a reply to message #929529] Thu, 04 October 2012 10:01 Go to previous message
Bertin Kiekebosch is currently offline Bertin Kiekebosch
Messages: 306
Registered: August 2011
Senior Member
Thanks it helps,

setting the gridData keeps the container small.

regards Bertin
Previous Topic:DataSourceSecurityFilter ClassNotFoundException
Next Topic:Adding rows to tablefield
Goto Forum:
  


Current Time: Sun Oct 26 05:12:39 GMT 2014

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

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