Can't put content behind SWT Wizard Help Button

前端 未结 1 1786
夕颜
夕颜 2020-12-18 07:04

I created a SWT based Wizard which has an own help Button by custom. Now i want to put some content behind that, so maybe a SWT browser will be openend and a predifined HTML

相关标签:
1条回答
  • 2020-12-18 08:08

    I am assuming that you are using the standard JFace interfaces and classes for the wizard implementation. So, in your wizard page (extending org.eclipse.jface.wizard.WizardPage) you just have to override the performHelp method. See the below snippet.

    @Override
    public void performHelp() 
    {
        Shell shell = new Shell(getShell());
        shell.setText("My Custom Help !!");
        shell.setLayout(new GridLayout());
        shell.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    
        Browser browser = new Browser(shell, SWT.NONE);
        browser.setUrl("http://stackoverflow.com/questions/7322489/cant-put-content-behind-swt-wizard-help-button");
        browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    
        shell.open();
    }
    

    >>Wizard image

    enter image description here

    >>After pressing the help button

    enter image description here

    0 讨论(0)
提交回复
热议问题