Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » menu accelerators
menu accelerators [message #462064] Wed, 05 October 2005 14:42 Go to next message
Eclipse UserFriend
Originally posted by: mackendw.sympatico.ca

I have specified several menu accelerators for my menu (File, Edit,
tools...) on the menu bar. ALT-F is the file quicky, ALT-E for Edit, etc.
On linux this works properly. On Windows, it doesn't?

Is this a known bug?

here is how I'm specifying it for Linux:

File_Menu_Item.setText("&File\tALT+F");

I just put a if/then block around it to use the above for linux and "File"
for the text with no accelerator for windows.

Thx.
Wendell
Re: menu accelerators [message #462086 is a reply to message #462064] Wed, 05 October 2005 21:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddana78ar.yahoo.com.ar

Hi Wendell, you don't need to put an accelerator to the items in the menu bar, you only need to put the "&" before the letter that you want to put the accelerator, like this:
File_Menu_Item.setText("&File");
it'll work with the Alt+F combined keys.

this link will show you some snippets:
http://www.java2s.com/ExampleCode/SWT-JFace-Eclipse/Menu.htm

Best Regards
Re: menu accelerators [message #462183 is a reply to message #462064] Fri, 07 October 2005 15:25 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Windows does not show menu mnemonics by default, but if you hold down the
Alt key then File's "F" should become underlined.

Grant

"Wendell Mackenzie" <mackendw@sympatico.ca> wrote in message
news:dfd32b3c0aab7910d628b024b038ba34$1@www.eclipse.org...
> I have specified several menu accelerators for my menu (File, Edit,
> tools...) on the menu bar. ALT-F is the file quicky, ALT-E for Edit, etc.
> On linux this works properly. On Windows, it doesn't?
>
> Is this a known bug?
>
> here is how I'm specifying it for Linux:
>
> File_Menu_Item.setText("&File\tALT+F");
>
> I just put a if/then block around it to use the above for linux and "File"
> for the text with no accelerator for windows.
>
> Thx.
> Wendell
>
Previous Topic:Extending Item?
Next Topic:right-click on TableItem
Goto Forum:
  


Current Time: Fri Apr 26 05:44:16 GMT 2024

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

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

Back to the top