[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Tooltip on TreeView leaves
|
see http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg27770.html
"Werner Janjic" <linux@xxxxxxxxxx> ha scritto nel messaggio
news:eiv84b$q54$1@xxxxxxxxxxxxxxxxxxxx
> Hi!
>
> Nobody an idea on this? Even a "no this is not possible" would already
> help ;-)
>
> Thx!
>
> Werner Janjic schrieb:
>> Hello!
>>
>> I've implemented a data tree view for a plugin I am developing. After
>> hours of searching, I've still not found an opportunity to show tool-tip
>> information on the tree's parent or leave objects.
>>
>> There is no TreeParent.setToolTip("abc") or TreeObject.setToolTip("abc")
>> method to be found.
>>
>> I saw some workaround for tables but I wasn't able to transfer them to
>> Treeviews.
>>
>> Is it somehow possible to have a tool-tip shown up when I stop with the
>> mouse over a TreeView leave? Perhaps over an ActionListener which I am
>> quite new to.
>>
>> Thank you in advance for your help. Here my code for the initialization:
>>
>> ---- schnipp ----
>>
>> private void initialize() {
>> if (resultMap != null) {
>> TreeParent root = new TreeParent(searchString);
>>
>> Iterator it = resultMap.keySet().iterator();
>> while (it.hasNext()) {
>> String link = (String)it.next();
>> System.out.println("- " + link);
>> TreeParent par = new TreeParent(link);
>> Vector leaves = (Vector)resultMap.get(link);
>> Iterator leaveIt = leaves.iterator();
>> while (leaveIt.hasNext()) {
>> TreeObject to = new TreeObject((String)leaveIt.next());
>> par.addChild(to);
>> }
>> root.addChild(par);
>> }
>>
>> if (invisibleRoot == null)
>> invisibleRoot = new TreeParent("");
>>
>> invisibleRoot.setParent(root);
>> invisibleRoot.addChild(root);
>> } else {
>> // if you want to show something although there are no results
>> // implement it here!
>> }
>> }
>>
>>
>> ---- schnapp ----
>