Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Popup menu, accelerators won't work(Is it by intention? How to deal with it? )
icon5.gif  Popup menu, accelerators won't work [message #1533292] Sun, 28 December 2014 13:27
Michail Vokhm is currently offline Michail VokhmFriend
Messages: 11
Registered: November 2014
Junior Member
Hi!
I'm new in SWT, try to do some simple excercises.
I found that accelerator keys (Reyboard shortcuts) dont'work in a popup menu as they do in a menubar. I have not found any discussion or solution of the issue in the internet, even no hints, except for the single question in this forum (https://www.eclipse.org/forums/index.php/t/505996/), that is left without answer.

The Item2 is an item of the main menu, shotcut works fine:
  	item2.setText("Item&2\tCtr+2");
  	item2.setAccelerator(SWT.MOD1 | '2');

The item3 is a pop-up menu item, the menu and item itself works fine, but the accelerator don't work:
 	item3.setText("Item&3\tCtr+3");
  	item3.setAccelerator(SWT.MOD1 | '3');

The full code is attached.

Can anybody explain what's the matter? Is such a behaviour implemented by intention? Is my way wrong? What is the right way - how should one make shortcuts in popup menu work?
Previous Topic:Monitoring SWT resources
Next Topic:Simple example to bind combo to enum
Goto Forum:
  


Current Time: Thu Apr 18 03:11:37 GMT 2024

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

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

Back to the top