Can't put content behind SWT Wizard Help Button
Asked Answered
C

1

5

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 Doc will be shown. But I don't have any clue where to access the Actions of the Help Button within my Wizard. Any idea?

Clang answered 6/9, 2011 at 15:38 Comment(1)
Post the code of your wizard, it's quite hard to help you without any piece of additional information..Govern
J
8

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("https://mcmap.net/q/1993598/-can-39-t-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

Joanejoanie answered 30/9, 2011 at 9:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.