How to update controls on a wizard page?

不打扰是莪最后的温柔 提交于 2020-03-05 00:27:45

问题


I have a wizard consisting of 2 wizard pages.

@Override
public void addPages() {
    super.addPages();
    addPage(firstPage);
    addPage(secondPage);    
}

I see that the createControl method of both the pages gets called immediately when the wizard is shown.

The first wizard page has a text field. I want to display the same text value on the second page entered by the user on the first page when he navigates from first page to the send page.

How can I achieve this? How can I update the controls?


回答1:


This is basically up to you to arrange.

For example, you could pass a reference to firstPage to the secondPage when it is constructed. The setVisible method of the second page can then call some method on the first page to get the value you need.



来源:https://stackoverflow.com/questions/60151587/how-to-update-controls-on-a-wizard-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!