Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » How to add custom tooltip to ColumnLabelProvider?
How to add custom tooltip to ColumnLabelProvider? [message #1764808] Fri, 02 June 2017 11:05
Elena Larina is currently offline Elena LarinaFriend
Messages: 2
Registered: June 2017
Junior Member
I have tableviewer and want to add tooltip to the cells. Tooltip should be custom for the ability to format text and show scrollbar on mouse click on tooltip.

Now I can get default tooltip by
TableViewerColumn column = createTableViewerColumn(Messages.NewsView_Heading, 1);
column.setLabelProvider(new ColumnLabelProvider(){
@Override
public String getToolTipText(Object element) {
News news = (News)element;
return news.getHeading() + "\n" + news.getAuthor() + "\n" +
news.getContent();
}
});

and by adding
ColumnViewerToolTipSupport.enableFor(viewer);

But how to use a custom tooltip in ColumnLabelProvider or how to add tooltip support to the table by another way?
Previous Topic:Editing in TreeViewer
Next Topic:How to populate custom list data (two levels) using CheckedTreeSelectionDialog
Goto Forum:
  


Current Time: Mon Sep 24 11:07:52 GMT 2018

Powered by FUDForum. Page generated in 0.01541 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top