From: Dave on 30 Jul 2010 14:12 I have a GUI with 4 axes but I only want the cursor to work on 2 of them (the other two are images). How can I disable the cursor over the 2 static axes? I've done similar things with SetAllowAxesZoom to disallow zooming, but I can't figure out how to disallow cursoring.
From: Dave on 30 Jul 2010 14:28 "Dave " <dkraige(a)kcftech.com> wrote in message <i2v4lk$qor$1(a)fred.mathworks.com>... > I have a GUI with 4 axes but I only want the cursor to work on 2 of them (the other two are images). How can I disable the cursor over the 2 static axes? I've done similar things with SetAllowAxesZoom to disallow zooming, but I can't figure out how to disallow cursoring. The reason I want to disallow cursoring is so irrelevant datatips don't pop up over my axes.
From: Walter Roberson on 30 Jul 2010 14:26 Dave wrote: > I have a GUI with 4 axes but I only want the cursor to work on 2 of them > (the other two are images). How can I disable the cursor over the 2 > static axes? I've done similar things with SetAllowAxesZoom to disallow > zooming, but I can't figure out how to disallow cursoring. Set the HitTest property off on any object you don't want to be clickable. However, I am not certain what you mean by "disable the cursor". Possibly you want to set the figure WindowButtonMotionFcn callback so that when the cursor enters the prohibited area, you set(gcf, 'CurrentPoint', V) to some V outside of the prohibited area.
From: Dave on 30 Jul 2010 15:03 > However, I am not certain what you mean by "disable the cursor". I mean I don't want the cursor tool to be active over those axes, so that a user cannot click on them and have a datatip pop up. The axes are just there for displaying images, I don't want datatips popping up on them. But other axes are used for viewing data so I want datatips there, so I can't just turn off the datacursormode for the whole figure.
From: Walter Roberson on 30 Jul 2010 15:53 Dave wrote: > >> However, I am not certain what you mean by "disable the cursor". > > I mean I don't want the cursor tool to be active over those axes, so > that a user cannot click on them and have a datatip pop up. The axes > are just there for displaying images, I don't want datatips popping up > on them. But other axes are used for viewing data so I want datatips > there, so I can't just turn off the datacursormode for the whole figure. set(ImageHandle, 'HitTest', 'off') prevents new datatips from being created as a result of clicking on that image. It does not, however, prevent any existing data type from being dragged.
|
Pages: 1 Prev: Calling function on cursor click Next: i have aquestion!!! |