How to setHelp for a TrayDialog? [message #478781] |
Thu, 06 August 2009 20:32 |
Eric Jain 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);
}
|
|
|
Powered by
FUDForum. Page generated in 0.03125 seconds