Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » SWT Menu
SWT Menu [message #25563] Thu, 19 September 2002 11: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 17: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 17:24 Go to previous message
Chang is currently offline ChangFriend
Messages: 4
Registered: July 2009
Junior Member
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: Sun Apr 21 22:00:20 GMT 2024

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

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

Back to the top