|
Keyboard shortcut on MenuItem. -
05-27-2008, 01:24 AM
Hi All,
I have set a keyboard shortcut on the menuitem, but its not working. I'm pasting the code below..just have a peep and tell me if there is something wrong.
MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
menuItem.setText("Add Region" + "\tCtrl + R");
menuItem.setAccelerator(SWT.CONTROL | 'R');
menuItem.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent e)
{
System.out.println("Add Region Selected");
}
});
Thanks & Regards
Jay.
|