DianaM
unread,May 22, 2013, 4:46:08 AM5/22/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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!