当主体区域中没有行时打开上下文
在我的 Nattable 中,我实现了身体区域的上下文菜单,并且工作正常。但如果主体区域中没有可用行,则不会出现上下文菜单。
即使正文区域中没有行,如何也显示上下文菜单。
我使用的代码:
uiBindingRegistry.registerMouseDownBinding(MouseEventMatcher.bodyRightClick(SWT.NONE), new PopupMenuAction(bodyMenu));
提前致谢。
In my Nattable, I implemented context menu for body region and it is working fine. but if there is no row available in the body region context menu is not appearing.
How to make context menu appear even when there is no rows in the body region.
Code I used:
uiBindingRegistry.registerMouseDownBinding(MouseEventMatcher.bodyRightClick(SWT.NONE), new PopupMenuAction(bodyMenu));
Thanks in Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,如果主体区域中没有行,则实际上没有主体区域。因此,您无法使用 NatTable 上下文菜单功能在空白区域打开上下文菜单。实际上,这个空白区域甚至不是 NatTable 术语中的主体,它是 Canvas 的区域。也就是说,在标题下方的空白区域获取上下文菜单的唯一方法是以 SWT 方式配置弹出菜单。
Well, if there are no rows in the body region, you actually do not have a body region. Therefore you can't use the NatTable context menu functionality to open a context menu on the empty area. Actually that empty area is not even a body in NatTable terms, it is the area of the
Canvas
. That said, the only way to get a context menu on the empty area below the header is to configure a popup menu the SWT way.