You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have a menu and want to show the shortcut for delete
Menu menu = new Menu (main_shell, SWT.POP_UP);
MenuItem ctrl_c_item = new MenuItem (menu, SWT.PUSH);
ctrl_c_item.setText("Copy to clipboard \tCtrl+C");
MenuItem delete_item = new MenuItem (menu, SWT.PUSH);
delete_item.setText("Delete \tDEL");
this part is the problem: \tDEL
Ctrl+C works
i have tried delete or Delete but nothing works, how do i show this shortcut in the menu?
Activity
merks commentedon Jan 6, 2026
This sounds more like a question not an issue. It sounds like you want to do what this does:
I think you need to use org.eclipse.swt.widgets.MenuItem.setAccelerator(int).