If you hover over a table cell which is too narrow, some kind of popup occurs. How can I detect in OwnerDrawLabelProvider.paint()
whether the (truncated) table cell is painted or the popup?
Unfortunately, there seems to be no way to get this information directly from the Event
. But we implemented following ways:
On Windows the popup is higher than the cell (tested on Windows 7 aero theme). This means, if event.height != event.gc.getClipping().height
, the hover is painted.
On OS X the popup has the same size as the cell, but the Table
has a field drawExpansion
which is set to true
when painting the hover. Just use reflection to read it.
SWT on Ubuntu does not even show any hover at all...