Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: ButtonDownFcn Callback for Axes Objects
Date: Mon, 1 Dec 2008 22:54:01 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 10
Message-ID: <gh1pu9$da4$1@fred.mathworks.com>
References: <ggg9ng$c4m$1@fred.mathworks.com> <gghamu$oe5$1@fred.mathworks.com> <ggi6ji$n95$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228172041 13636 172.30.248.35 (1 Dec 2008 22:54:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Dec 2008 22:54:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869871
Xref: news.mathworks.com comp.soft-sys.matlab:504242


"Thiago " <thiago@mathworks.com> wrote in message <ggi6ji$n95$1@fred.mathworks.com>...
> Steve,
> 
> Yes, I have images on my axes. Thank you for the suggestions, by the way. Unfortunately the problem is not completely resolved. I have results with set(gcf,'WindowButtonDownFcn', '...callback goes here....') inside the CreateFcn of an axis object. However, I can't do this for more than one axis object. For this reason, I may use push buttons instead. 
> 
> PS: If you know a way to overcome this problem, please let me know.

Why not use the ButtonDownFcn property for the axes, not the figure. Then each axes can have its own ButtonDownFcn behavior. Also, as Steve suggested, be sure to set the HitTest property of the images to 'off'.

jiro