Skip to content

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

@reza1234567891

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

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