Re: Recording mouse button down event continuously??



On 10 Mai, 01:26, Pavan <pavanba...@xxxxxxxxx> wrote:
Hi all,

I would like to know how to record mouse button down event
continuously on an image displayed in a gui figure. In my
application, I have a figure with two images shown in it. When the
user clicks a button provided on the gui, it should change the button
state and when the user presses left mouse button on one of the
images, it should activate the mouse button down event it should read
the mouse position and it should keep on reading the position as long
as the user keep the mouse button down and it should stop recording
position once the mouse event goes button up (when user releases the
button). If the user presses right button it should change the state
of the button on the gui.

any ideas/help is appreciated..

thanks,
-Pavan

Hi.

If you have an application already, have a look at the callbacks
supported for figures. There are callbacks for WindowButtonUp, Down,
and Motion. These receive an eventdata structure with info about what
mouse button has been pressed at what pixel or position in an axes.
Also look for ginput in the help.

Cheers, Heiko

.