aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes To set tool tip only for the leaf nodes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "To set tool tip only for the leaf nodes" Watch "To set tool tip only for the leaf nodes" New topic
Author

To set tool tip only for the leaf nodes

Archana Venu Aradhyula
Greenhorn

Joined: Nov 05, 2008
Posts: 13
Hi all

I use a JTee where the elements are loaded dynamically. I want to set the tool tip only for the leaf elements. But it is setting to the entire tree.


How can i achieve this?

Thanks
Archana
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
Originally posted by Archana Venu Aradhyula:
I use a JTee where the elements are loaded dynamically. I want to set the tool tip only for the leaf elements. But it is setting to the entire tree.



It's hard to say without knowing more details, but two things to try are

  • call setToolTipText(null) even when !(value instanceof VPDTreeViewerNode)
  • set the tool tip on component, not on this


  • bitguru blog
    Michael Dunn
    Ranch Hand

    Joined: Jun 09, 2003
    Posts: 4632
    > I want to set the tool tip only for the leaf elements.

    seems to work OK like this

    Archana Venu Aradhyula
    Greenhorn

    Joined: Nov 05, 2008
    Posts: 13
    But still it is not working. It is considering the tooltip that i set at the last that is null.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: To set tool tip only for the leaf nodes