Skip to content

how make a menu show "\tdelete" as shortcut #2931

Closed

Description

@reza1234567891

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?

xubuntu 22.04

Activity

  1. merks commented on Jan 6, 2026

    @merks
    Contributor

    This sounds more like a question not an issue. It sounds like you want to do what this does:

    Image

    I think you need to use org.eclipse.swt.widgets.MenuItem.setAccelerator(int).

  2. locked and limited conversation to collaborators on Jan 6, 2026
  3. converted this issue into a discussion #2932 on Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions