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

Hi,

please ask this kind of question on the newsgroups. If you want to see
examples of the new Tooltip features. I'll answer your question there.

Tom

Alexander Saar schrieb:
> 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
> 
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl    leiter softwareentwicklung/CSE   mobile  ++43 676 3232147
------------------------------------------------------------------------
eduard-bodem-gasse 8/3    A-6020 innsbruck      fax      ++43 512 935833
http://www.bestsolution.at                      phone    ++43 512 935834

Attachment: signature.asc
Description: OpenPGP digital signature