|
Re: Grid: ToolTip and image in ColumnHeader [message #600162 is a reply to message #600013] |
Thu, 26 August 2010 12:13 |
David Messages: 23 Registered: June 2010 |
Junior Member |
|
|
OK, got it by myself.
I extended Grid.java and overwrote handleCellHover(int int).
protected boolean handleCellHover(int x, int y)
{
boolean superResult = super.handleCellHover(x, y);
// redo some code from superMethod to display tooltips in column headers
// when images are shown
final GridColumn col = getColumn(new Point(x, y));
final GridItem item = getItem(new Point(x, y));
if ((col != null)) {
if (item == null) {
if (y < headerHeight) {
if (y >= groupHeaderHeight) {
// on col header
if ((col.getText() != null)
&& ((!col.getText().equals("")) && ((col.getColumnGroup() != null) && (!col
.getColumnGroup().getText().equals("General"))))) {
showToolTip(item, col, null, new Point(x + 15, y));
}
}
}
}
}
return superResult;
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03902 seconds