Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: ButtonDownFcn Callback for Axes Objects
Date: Sun, 30 Nov 2008 11:49:02 +0000 (UTC)
Organization: PhysioSonics Inc
Lines: 9
Message-ID: <ggtuje$50j$1@fred.mathworks.com>
References: <ggg9ng$c4m$1@fred.mathworks.com> <gghamu$oe5$1@fred.mathworks.com> <ggi6ji$n95$1@fred.mathworks.com> <ggjpbb$c5d$1@fred.mathworks.com> <ggjvea$sfh$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228045742 5139 172.30.248.38 (30 Nov 2008 11:49:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 30 Nov 2008 11:49:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1129061
Xref: news.mathworks.com comp.soft-sys.matlab:503891


"Malcolm Lidierth" <ku.ca.lck@htreidil.mloclam> wrote in message <ggjvea$sfh$1@fred.mathworks.com>...
> Could you not test for what has been clicked upon in the WindowButtonDownFcn, e.g. using gca which should change when you click on a specific axes. Also there is the hittest() function - undocumented but returns the handle of the last object clicked on.
> ML

I don't find that there is a hittest function (in r2008b), and the hittest property is different than what you are referring to, as someone mentioned earlier in this thread.

I think what you are referring to is: get(handle_figure, 'CurrentObject')

There is a thorough discussion and example of how to implement what Thiago describes (i.e. replacing buttons by graphics) in this book: http://www.mathworks.com/support/books/book13266.html.