Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Imrect ButtonDown callback?

20 views
Skip to first unread message

DianaM

unread,
May 22, 2013, 4:46:08 AM5/22/13
to
Hello everyone! Is there a way to write a button down callback for an imrect object?
I keep searching online but I was not able to make any of the proposed solutions work (e.g. setting the 'NextPlot' property of the axes to 'replacechildren', or setting 'HitTest' to 'off' - actually imrect does not seem to have a HitTest property, why? or a ButtonDownFcn event, instead of only a positionChange event?). Only the WindowButtonDownFcn callback still works when clicking inside the imrect, but this makes things a bit complicated, having to figure out inside which of the imrects the click was made.
If it is possible and if it is not too much to ask, it would be really helpful if somebody would write a few lines that draw an imrect and then when clicking it (not dragging), to change its color?

Thanks so much for all your answers!
0 new messages