0

The default context menu for org.eclipse.swt.widgets.Text in Linux contains the "Insert Emoji" option.

Is there a way to remove that "Insert Emoji" option without removing other options?

enter image description here

1
  • SWT doesn't provide any way to change default menus.
    – greg-449
    Jan 3, 2020 at 13:39

1 Answer 1

1

The default menu provided for the Text widget cannot be modified. But SWT provides a way to replace the default menu with your custom pop-up menu using Text.setMenu(). Your code needs to implement the actions for all the menu items of the custom menu and also manage the clipboard.

For an example, please see: https://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.java

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.