Skip to main content



      Home
Home » Eclipse Projects » Technology Project and PMC » SWT Menu
SWT Menu [message #25563] Thu, 19 September 2002 07:09 Go to next message
Eclipse UserFriend
Originally posted by: kda.postsquare.com

Can any one tell me is it possible to see in Menu (MenuItem class)
accelerator key being visible to user not far from MenuItem text and aligned
to right. If this objects reserves some place for MenuItem image - it should
be able to show accelerator key. Am I right ?

Please point me to right forum group, if something wrong
Re: SWT Menu [message #26167 is a reply to message #25563] Fri, 20 September 2002 13:24 Go to previous message
Eclipse UserFriend
Originally posted by: Chang.Zu.com

Post in the eclipse.tools group.

To answer your question...

MenuItem menuItem = new MenuItem(menu, SWT.NONE);
menuItem.setText("&New\tCTRL+N");
menuItem.setAccelerator(SWT.CTRL + 'N');

The & before N makes sure that the N gets highlighted when you want to
access it. I hope this answers your question.

Make sure u post ur SWT and JFace questions in the tools group.

Dmitry Klymenko wrote:

> Can any one tell me is it possible to see in Menu (MenuItem class)
> accelerator key being visible to user not far from MenuItem text and aligned
> to right. If this objects reserves some place for MenuItem image - it should
> be able to show accelerator key. Am I right ?

> Please point me to right forum group, if something wrong
Re: SWT Menu [message #583016 is a reply to message #25563] Fri, 20 September 2002 13:24 Go to previous message
Eclipse UserFriend
Post in the eclipse.tools group.

To answer your question...

MenuItem menuItem = new MenuItem(menu, SWT.NONE);
menuItem.setText("&New\tCTRL+N");
menuItem.setAccelerator(SWT.CTRL + 'N');

The & before N makes sure that the N gets highlighted when you want to
access it. I hope this answers your question.

Make sure u post ur SWT and JFace questions in the tools group.

Dmitry Klymenko wrote:

> Can any one tell me is it possible to see in Menu (MenuItem class)
> accelerator key being visible to user not far from MenuItem text and aligned
> to right. If this objects reserves some place for MenuItem image - it should
> be able to show accelerator key. Am I right ?

> Please point me to right forum group, if something wrong
Previous Topic:?? Can't Set a Breakpoint ?? See Image
Next Topic:SWT UI-threading issue
Goto Forum:
  


Current Time: Fri Apr 18 20:14:41 EDT 2025

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

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

Back to the top