Dynamic changes to a wizard page [message #336248] |
Wed, 03 June 2009 10:25  |
Eclipse User |
|
|
|
Hi everyone,
I have a wizard with a few pages in it and I am trying to dynamically
change the contents of a page based on the inputs of the previous page.
The issue I am having is how do you do this? createControl is only called
once at the beginning of the creation of the wizard, which doesn't help
because it isn't known at that time what the page will look like. In
essence all I want to do is have a textbox on one page allow you to enter
a number and then show that number of textboxes on the next page. Should
be simple, right?
Also, how do you trigger the page's "refresh"? It seems like getNextPage
is called twice per page, once when you enter the page and again when you
leave it.
I have searched all through this forum on dynamically changing wizard
pages but haven't been able to find a working example. If anyone has an
example that would be great!
Thanks,
Andy
|
|
|
|
|
Re: Dynamic changes to a wizard page [message #336261 is a reply to message #336257] |
Thu, 04 June 2009 02:54  |
Eclipse User |
|
|
|
Originally posted by: aurelien.pupier.esial.net
Hi,
answer below
Andy a écrit :
> Thanks for the input. I tried adding
> public void setVisible(boolean visible){
> super.setVisibile(visible)
> new Label(composite, SWT.NONE).setText("Do you see this");
> }
> in my WizardPage, but it didn't seem to display it to the WizardPage.
> The only contents I saw were the ones that were added during the
> createControl method. I put a print statement in and setVisible is
> indeed being called. Also, composite is a class level variable and was
> instantiated in createControl.
>
> Is there some kind of forced refresh of the page that I need to do at
> the end of setVisible?
>
Yes, I think that you have to do a .layout(true) on your parent composite.
> Thanks,
>
> Andy
>
|
|
|
Powered by
FUDForum. Page generated in 0.04018 seconds