Path: news.mathworks.com!not-for-mail
From: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: AXES hides ButtonDownFcn
Date: Tue, 2 Aug 2011 16:59:10 +0000 (UTC)
Organization: Universit&#228;t Heidelberg
Lines: 17
Message-ID: <j19acu$2vh$1@newscl01ah.mathworks.com>
References: <j14nmd$e2j$1@newscl02ah.mathworks.com> <j194t0$f5n$1@newscl01ah.mathworks.com>
Reply-To: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1312304350 3057 172.30.248.48 (2 Aug 2011 16:59:10 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 2 Aug 2011 16:59:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869888
Xref: news.mathworks.com comp.soft-sys.matlab:738464

Dear Steven,

Thanks for this answer.
You are right: If the AXES is created at first, the UICONTROL keeps control over its ButtonDownFcn. 

> The axes ButtonDownFcn "Executes whenever you press a mouse 
> button while the pointer is within the axes, but not over another graphics 
> object parented to the axes. "

And in addition, the AXES' ButtonDownFcn seems to be called whenever  you press a mouse button while the pointer is within the axes, but not over later created GUI elements.

While this is expected when I stack several AXES objects, I thought, that UICONTROL are set on top of all AXES and AXES-children - as for the visualization and for catching the left-clicks.
I do not think, that this is an intuitive behaviour and it is not explicitely documented. But the behaviour is equal for Matlab 5.3, 6.5, 2009a and 2011a - so it is very stable. Therefore I'd do not call it a bug now and changing the behavior might reduce the backward compatibility.

I'm curious to hear if this is the same under Linux and MacOS.

Kind regards, Jan