Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How do I add ToolTips to uitree's?

Subject: How do I add ToolTips to uitree's?

From: farhan.rizwi@unswalumni.com

Date: 30 Jul, 2007 20:09:45

Message: 1 of 2

Hi,

Adding tooltips to a uitable seems pretty straightforward, for example

uit=uitable;
uit.Table.setToolTipText('voila');

.. and there you have it.

Unfortunately, this scheme does not work with uitree's. I suspect it
has to do with various subclassing of the createToolTip method but I
haven't figured it all out yet.

If someone else has, could the enlighten the group?

Thanks in advance for any help.

-Farhan

Subject: How do I add ToolTips to uitree's?

From: Yair Altman

Date: 31 Jul, 2007 17:53:48

Message: 2 of 2

 farhan.rizwi@unswalumni.com wrote in message <1185851385.458338.216410@x35g2000prf.googlegroups.com>...
> Hi,
>
> Adding tooltips to a uitable seems pretty straightforward, for example
>
> uit=uitable;
> uit.Table.setToolTipText('voila');
>
> .. and there you have it.
>
> Unfortunately, this scheme does not work with uitree's. I suspect it
> has to do with various subclassing of the createToolTip method but I
> haven't figured it all out yet.


You seem to be fairly advanced in Swing issues and if that's the case then I suggest you use Swing's JTree instead of Matlab's uitree, which doesn't really give you too much extra functionality anyway. Of course, tooltips in JTree are straightforward as your snippet above. You can even have cell-specific tooltips possible, via the tree-node's renderer.

Yair Altman
http://www.ymasoftware.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us