<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169191</link>
    <title>MATLAB Central Newsreader - ButtonPressFcn behaves strangely</title>
    <description>Feed for thread: ButtonPressFcn behaves strangely</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 13 May 2008 18:03:03 -0400</pubDate>
      <title>Re: ButtonPressFcn behaves strangely</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169191#431864</link>
      <author>jay vaughan</author>
      <description>"matt dash" &amp;lt;n.a@mail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g0cjg8$qke$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; The image is in front of the axes so you are clicking the&lt;br&gt;
&amp;gt; image, not the axes. Turn the hittest property of the image&lt;br&gt;
&amp;gt; off and you'll be fine.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Matt,&lt;br&gt;
&lt;br&gt;
that worked perfectly. Thanks!&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
J&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 13 May 2008 17:35:04 -0400</pubDate>
      <title>Re: ButtonPressFcn behaves strangely</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169191#431859</link>
      <author>matt dash</author>
      <description>The image is in front of the axes so you are clicking the&lt;br&gt;
image, not the axes. Turn the hittest property of the image&lt;br&gt;
off and you'll be fine.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 13 May 2008 17:13:03 -0400</pubDate>
      <title>Re: ButtonPressFcn behaves strangely</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169191#431857</link>
      <author>jay vaughan</author>
      <description>"jay vaughan" &amp;lt;jvaughan5.nospam@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g0ch73$79t$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am running a GUI with an axes in it. When I start the GUI&lt;br&gt;
&amp;gt; the axes are empty. During this time I am able to click on&lt;br&gt;
&amp;gt; the figure and return a (diagnostic) message. I did the same&lt;br&gt;
&amp;gt; for the GUI itself, and both work.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % --- Executes on mouse press over axes background.&lt;br&gt;
&amp;gt; function axes1_ButtonDownFcn(hObject, eventdata, handles)&lt;br&gt;
&amp;gt; disp('mouse button pressed on axes1');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % --- Executes on mouse press over figure background.&lt;br&gt;
&amp;gt; function figure1_ButtonDownFcn(hObject, eventdata, handles)&lt;br&gt;
&amp;gt; disp('mouse button pressed on figure1');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; But once I use image(frame) to display a frame in the axes,&lt;br&gt;
&amp;gt; axes1_ButtonDownFcn can not be called anymore by mouse&lt;br&gt;
&amp;gt; clicks on the axes, although figure1_ButtonDownFcn still can&lt;br&gt;
&amp;gt; get called by mouse clicks on the figure background. This&lt;br&gt;
&amp;gt; puzzles me quite a bit. Any ideas how I could fix this so&lt;br&gt;
&amp;gt; that ButtonDownFcn continues to work after image(frame)?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; J&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
"jay vaughan" &amp;lt;jvaughan5.nospam@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g0ch73$79t$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am running a GUI with an axes in it. When I start the GUI&lt;br&gt;
&amp;gt; the axes are empty. During this time I am able to click on&lt;br&gt;
&amp;gt; the figure and return a (diagnostic) message. I did the same&lt;br&gt;
&amp;gt; for the GUI itself, and both work.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % --- Executes on mouse press over axes background.&lt;br&gt;
&amp;gt; function axes1_ButtonDownFcn(hObject, eventdata, handles)&lt;br&gt;
&amp;gt; disp('mouse button pressed on axes1');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % --- Executes on mouse press over figure background.&lt;br&gt;
&amp;gt; function figure1_ButtonDownFcn(hObject, eventdata, handles)&lt;br&gt;
&amp;gt; disp('mouse button pressed on figure1');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; But once I use image(frame) to display a frame in the axes,&lt;br&gt;
&amp;gt; axes1_ButtonDownFcn can not be called anymore by mouse&lt;br&gt;
&amp;gt; clicks on the axes, although figure1_ButtonDownFcn still can&lt;br&gt;
&amp;gt; get called by mouse clicks on the figure background. This&lt;br&gt;
&amp;gt; puzzles me quite a bit. Any ideas how I could fix this so&lt;br&gt;
&amp;gt; that ButtonDownFcn continues to work after image(frame)?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; J&lt;br&gt;
&lt;br&gt;
Sorry for the quick reply...I wanted to add that mouse&lt;br&gt;
clicks at the very edge of the axes do call&lt;br&gt;
axes1_ButtonDownFcn, but not mouse clicks in the interior.&lt;br&gt;
If it is helpful, I am also using a function to return mouse&lt;br&gt;
position, although disabling this function (i.e. removing&lt;br&gt;
the WindowButtonMotionFcn callback) did not restore the&lt;br&gt;
mouse clicks in the interior of the axes after image(frame).&lt;br&gt;
&lt;br&gt;
J&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 13 May 2008 16:56:03 -0400</pubDate>
      <title>ButtonPressFcn behaves strangely</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169191#431854</link>
      <author>jay vaughan</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I am running a GUI with an axes in it. When I start the GUI&lt;br&gt;
the axes are empty. During this time I am able to click on&lt;br&gt;
the figure and return a (diagnostic) message. I did the same&lt;br&gt;
for the GUI itself, and both work.&lt;br&gt;
&lt;br&gt;
% --- Executes on mouse press over axes background.&lt;br&gt;
function axes1_ButtonDownFcn(hObject, eventdata, handles)&lt;br&gt;
disp('mouse button pressed on axes1');&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
% --- Executes on mouse press over figure background.&lt;br&gt;
function figure1_ButtonDownFcn(hObject, eventdata, handles)&lt;br&gt;
disp('mouse button pressed on figure1');&lt;br&gt;
&lt;br&gt;
But once I use image(frame) to display a frame in the axes,&lt;br&gt;
axes1_ButtonDownFcn can not be called anymore by mouse&lt;br&gt;
clicks on the axes, although figure1_ButtonDownFcn still can&lt;br&gt;
get called by mouse clicks on the figure background. This&lt;br&gt;
puzzles me quite a bit. Any ideas how I could fix this so&lt;br&gt;
that ButtonDownFcn continues to work after image(frame)?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
J&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
