Nattable menu invocation when table is empty [message #1697557] |
Thu, 04 June 2015 21:01 |
Marti DeMore Messages: 1 Registered: July 2009 |
Junior Member |
|
|
I have an SWT composite that contains a Nattable (as Grid) and nothing else. I have added my own items to the menu attached to the BODY area of the grid. Some of these items need to be accessible when there are no rows in the table, but the menu will not come up if there are no rows in the table. I tried attaching the menu both to the BODY region and the GRID region, but no luck. (The latter results in no menu at all).
On the Mac I got around this by attaching a second menu to the underlying composite, and having a menu detect listener on that menu that allows that menu to come up only when the table is empty (otherwise I get BOTH menus). This way I get the table menu if there are rows, and the other SWT menu if there are not.
On RedHat Linux with Gnome desktop this does not work. The mouse event does not appear to get through to the composite. The menu detect listener on the menu attached to the Nattable grid body does get triggered, but that menu still does not come up. How can a MenuDetectListener get invoked, but there is still NO MENU??
It is not acceptable to attach the table just to the ROW HEADER area of the grid. For one thing, my row header must be hideable. For another, my user is staring at a large blank composite where the table rows would normally be. The natural behavior is to expect to click anywhere in that composite and see the basic menu, not to have to locate the mouse in the table header first.
|
|
|
|
Powered by
FUDForum. Page generated in 0.01873 seconds