开发者

SWT Text widget: how to insert own MenuItems into the default context menu?

The default context menu for the org.eclipse.swt.widgets.Text class is quite a rich thing, packed with features that the user has come to depend on ...

SWT Text widget: how to insert own MenuItems into the default context menu?

However, as soon as I 开发者_开发知识库assign my own context menu with Control.setMenu() all that richness goes away. Is there a means of inserting my own MenuItem object into this system-created menu .. can I have my cake and eat it?

Your clues are always most welcome.

M.


You cannot access the native menu from SWT. It is there, if there are no other menus set for the control. As you noticed, as soon as you set your own menu for the control, this new menu will completely replace the native menu.

As far as I can see, the behavior is common to all platforms.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜