Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to setHelp for a TrayDialog?
How to setHelp for a TrayDialog? [message #478781] Thu, 06 August 2009 20:32
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
I have a working help system set up, but am having trouble figuring out
how to get help shown for a TrayDialog.

The following code doesn't work as dialog.getShell() returns null until
the dialog is shown (and after which it's too late):

ListDialog dialog = new ListDialog(getShell())
setHelp(dialog.getShell(), helpId)
dialog.open();

So I tried this, but I don't get any help (or error) after pressing F1:

ListDialog dialog = new ListDialog(getShell()) {
@Override
protected Control createContents(Composite parent) {
Control contents = super.createContents(parent);
Help.register(contents, helpid);
return contents;
}
}
dialog.open();

...even if I force a help icon to appear in the dialog:

dialog.setHelpAvailable(true);

For the record:

void setHelp(Control control, String helpId) {
PlatformUI.getWorkbench().getHelpSystem()
.setHelp(control, helpId);
}
Previous Topic:contribute toolbar to a view
Next Topic:HowTo: Minimize Action for RCP
Goto Forum:
  


Current Time: Fri Apr 26 03:11:22 GMT 2024

Powered by FUDForum. Page generated in 0.03191 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top