SWT Menu [message #25563] |
Thu, 19 September 2002 11:09 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03446 seconds