[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: tooltips for the generated editor

Hi Eike,
thanks for the link. I don't really know where to add the tool tips. I
tried to do the following just to test if it works:

in the generated createPages() method I modified it for the first tab
like this

ViewerPane viewerPane =
	new ViewerPane(getSite().getPage(), CRUISeMetaModelEditor.this) {
	@Override
	public Viewer createViewer(Composite composite) {
		Tree tree = new Tree(composite, SWT.MULTI);
		TreeViewer newTreeViewer = new TreeViewer(tree);
		tree.setToolTipText("Test tooltip");
		return newTreeViewer;
	}
	//...
};

But the test tooltip will only be shown if I hover the tree-less area.
Want to say that if I hover the tree and elements of it the tooltip
won't be displayed, only around of the tree it will be displayed. The
other issue is how to determine which element will be hovered actually.
Adding a MouseListener?


Eike Stepper wrote:
> Hi Gilbert,
> 
> Have you tried some of the snippets? -->
> http://wiki.eclipse.org/index.php/JFaceSnippets#Snippet011CustomTooltips
> 
> Cheers
> /Eike