Path: news.mathworks.com!not-for-mail
From: "jay vaughan" <jvaughan5.nospam@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: ButtonPressFcn behaves strangely
Date: Tue, 13 May 2008 16:56:03 +0000 (UTC)
Organization: harvard
Lines: 25
Message-ID: <g0ch73$79t$1@fred.mathworks.com>
Reply-To: "jay vaughan" <jvaughan5.nospam@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210697763 7485 172.30.248.37 (13 May 2008 16:56:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 May 2008 16:56:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1215048
Xref: news.mathworks.com comp.soft-sys.matlab:468200


Hi,

I am running a GUI with an axes in it. When I start the GUI
the axes are empty. During this time I am able to click on
the figure and return a (diagnostic) message. I did the same
for the GUI itself, and both work.

% --- Executes on mouse press over axes background.
function axes1_ButtonDownFcn(hObject, eventdata, handles)
disp('mouse button pressed on axes1');


% --- Executes on mouse press over figure background.
function figure1_ButtonDownFcn(hObject, eventdata, handles)
disp('mouse button pressed on figure1');

But once I use image(frame) to display a frame in the axes,
axes1_ButtonDownFcn can not be called anymore by mouse
clicks on the axes, although figure1_ButtonDownFcn still can
get called by mouse clicks on the figure background. This
puzzles me quite a bit. Any ideas how I could fix this so
that ButtonDownFcn continues to work after image(frame)?

Thanks,
J