Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How do I add ToolTips to uitree's?
Date: Tue, 31 Jul 2007 17:53:48 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 20
Message-ID: <f8nsvc$phu$1@fred.mathworks.com>
References: <1185851385.458338.216410@x35g2000prf.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1185904428 26174 172.30.248.35 (31 Jul 2007 17:53:48 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 31 Jul 2007 17:53:48 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:421893



 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