From: Matthew Lang on
I apologize if this is bringing a dead thread back to life, but this seemed the most similar to a problem I'm having. I too would like to use the waitforbuttonpress functionality to select points and regions within a figure, but also have zoom/pan/rotate functionality from the plot tools. However, when waitforbuttonpress is active, as rajko saw, the ButtonDownFcn is bypassed and the pan/zoom/rotate tools (while they change the icon) are unresponsive.

I tried playing with the 'HitTest' property (though I am running R2009b) but am still unable to switch to the plot tools while waitforbuttonpress is active. It seems like there should be a simple solution to this, but perhaps this is more complicated of a UI behaviour than I first thought.



"rajko" <rajko.petelka(a)mathworks.com> wrote in message <gptllm$iml$1(a)fred.mathworks.com>...
> OK,
>
> i found a solution for this small problem.
>
> I i disable the "HitTest" prior the waitforbuttonpress function and enable the "HitTest" after the hole procedure, everything is fine.
> Then i have the same behavior with 2008a and 2009a.
>
> Rajko
From: Steven Lord on

"Matthew Lang" <mattlang(a)gmail.com> wrote in message
news:hlu5dc$fbr$1(a)fred.mathworks.com...
>I apologize if this is bringing a dead thread back to life, but this seemed
>the most similar to a problem I'm having. I too would like to use the
>waitforbuttonpress functionality to select points and regions within a
>figure, but also have zoom/pan/rotate functionality from the plot tools.
>However, when waitforbuttonpress is active, as rajko saw, the ButtonDownFcn
>is bypassed and the pan/zoom/rotate tools (while they change the icon) are
>unresponsive.

I'm fairly certain you can't do this directly. How would MATLAB know
whether your click was supposed to be interpreted as a request to select a
point or whether you wanted to zoom in on that point?

> I tried playing with the 'HitTest' property (though I am running R2009b)
> but am still unable to switch to the plot tools while waitforbuttonpress
> is active. It seems like there should be a simple solution to this, but
> perhaps this is more complicated of a UI behaviour than I first thought.

It's not complicated -- it's ambiguous.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ