Skip to main content

Enabling help from a pull down menu

1 reply [Last post]
Anonymous

Here's a question that's been nagging me all day. How would you go about enabling help from a menu item? Specifically a JMenuItem.

Calling the HelpBroker.enableHelp(Component, String, HelpSet) method doesn't seem to be an answer as it takes an awt menu item, but not a JMenuItem.

I've come up with one way, but it's not context sensitive so it's a marginal win.

Thoughts comments and suggestions most welcome.

Regards,

Jason

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Roger Brinkley

java-help@JAVADESKTOP.ORG wrote:
> Here's a question that's been nagging me all day. How would you go
> about enabling help from a menu item? Specifically a JMenuItem.
>
> Calling the HelpBroker.enableHelp(Component, String, HelpSet) method
> doesn't seem to be an answer as it takes an awt menu item, but not a
> JMenuItem.

HelpBroker.enableHelpOnButton(menu_help, "intro", mainHb.getHelpSet());

or

CSH.setHelpIDString(menu_help, "intro");
menu_help.addActionListener(new CSH.DisplayHelpFromSource(mainHb));

Binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.