不能把后面内容SWT向导帮助按钮 [英] Can't put content behind SWT Wizard Help Button

查看:232
本文介绍了不能把后面内容SWT向导帮助按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了按习俗有一个自己的帮助按钮SWT基于向导。现在,我希望把后面的一些内容,所以也许一个SWT浏览器会双头呆和pdifined HTML文件一个$ P $将被显示。但是,我没有任何线索在哪里可以访问我的向导中的帮助按钮的动作。任何想法?

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?

推荐答案

我的假设您正在使用的向导执行标准JFace的接口和类。所以,在你的向导页(延长org.eclipse.jface.wizard.WizardPage ),你只需要重写 performHelp 方法。请参见下面的代码片段。

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

>> pressing帮助按钮后

>>After pressing the help button

这篇关于不能把后面内容SWT向导帮助按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆