[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Table cell tooltip problem

Hi everbody,
I have a question regarding the tooltip support for table cells.

I recently updated to SWT 3.3M5 and tried the new tooltip feature for table cells. Following the API docs, I created a CellLabelProvider with support for tooltips and added it to a ViewerColumn:


// create table viewer taskTableViewer = new TableViewer(table);

// create columns
TableColumn titleCol = new TableColumn(table, SWT.NONE);
titleCol.setResizable(false);
titleCol.setWidth(100);
titleCol.setText("Title");

TableViewerColumn vCol = new TableViewerColumn(taskTableViewer,
                        titleCol);

vCol.setLabelProvider(new TaskTableLabelProvider());
taskTableViewer.setColumnPart(vCol, 0);


After starting my application, I didn't get any output in my table. After some debugging, I found out that the getColumnText() method is never called. (same holds true for getColumnImage()).


After that I tried to add the label provider additionally to my TableViewer.


TaskTableLabelProvider provider = new TaskTableLabelProvider(); taskTableViewer.setLabelProvider(provider);


This results in having the original cell text display. If I hover over the cell, an empty tooltip gets display. Again I started the debugger and found out, that a default instance of CellLabelProvider is called (wich returns null) by the framework and not my specialized implementation.


Any hint what I did wrong or how I can fix this problem?

Best regards,
Alex
begin:vcard
fn:Alexander Saar
n:Saar;Alexander
org:Mindquarry GmbH;Mindquarry Software Development
adr:;;August-Bebel-Str. 88;Potsdam;Brandenburg;14482;Germany
email;internet:alexander.saar@xxxxxxxxxxxxxx
title:Chief Technology Officer
tel;work:+49 (0)331 97992-223
tel;cell:+49 (0)177 5985437
x-mozilla-html:FALSE
url:http://www.mindquarry.com
version:2.1
end:vcard