Cannot put content for help on the help button of the SWT wizard

I created a wizard based on SWT, which has its own help button as I see fit. Now I want to put some content behind this, so maybe the SWT browser will open and a predefined HTML document will be shown. But I have no clue where to access the Help button Actions in my Wizard. Any idea?

+5
source share
1 answer

I assume that you are using standard JFace interfaces and classes to implement the wizard. So, on the wizard ( extending org.eclipse.jface.wizard.WizardPage) page, you just need to override the method performHelp. See snippet below.

@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

+8
source

All Articles