There is yet a problem. ButtonDownFcn is only invoked if the <axes> object
is set to no visibility, possibly Enable='off'. Otherwise Callback is
invoked and I found absolutely no way of getting ButtonDownFcn to have any
effect. There is no property called Axes.Enable either.
A Web engine search only revealed more people who experience the exact same
problem, but no solutions. Help would be highly appreciated.
Roy
"Steven Lord" <slord@mathworks.com> wrote in message
news:c24s0s$sbi$1@fred.mathworks.com...
> Roy S Schestowitz wrote:
> > With relation to that question, can I possibly have a callback
> > function invoked when I click a figure? I want to be able to run some
> > commands when a picture in my GUI is pressed.
>
> Take a look at the following page:
>
>
http://www.mathworks.com/access/helpdesk/help/techdoc/infotool/hgprop/doc_frame.shtml
>
> All the documented properties of the Handle Graphics objects are listed
> here. In particular, both Figure and Image objects have a property called
> ButtonDownFcn that does pretty much what you would expect from the name --
> it executes the function stored in that property when you click your mouse
> while the pointer is on that object. Figure also has a few other
functions
> that you might find useful: look at the WindowButton* properties.
>
> Another link you and the OP may find useful is
> http://www.mathworks.com/support/solutions/data/2045.shtml -- this has an
> example of something similar to what you and the OP described you wanted
to
> do.
>
> --
> Steve Lord
> slord@mathworks.com
>
>
|