Info

This question is closed. Reopen it to edit or answer.

GUIDE: set one axes to non-programmable?

2 views (last 30 days)
Brian
Brian on 30 Jul 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello, thanks for reading this,
I have a GUI with many axes, and most of them have callbacks (scrollfxn is a big one at the moment). What I want to do for most of my graphs is associate a callback with it, and I have that working. I do have one axes, however, that I want to have static, and just post a simple plot. However, when I select the graph and do a random event that starts a callback it bricks the GUI.
Is there a way to set certain callbacks for certain graphs to null functions? As in, when I click on a certain axes, I set the callbacks to something that doesn't do and return anything, or remove the callback entirely?
EDIT:
One thing I want to mention is I know you can type in the function window:
set(handles.axes,'HandleVisibility', 'off')
to make it so that that axes cannot have any callbacks anymore, but what I want to do is press down on a axes, see which one it is, and then associate the callbacks I want. When I click on another axes, I want to do the same for that axes. My problem is I can't set axes-specific custom functions: when I use the line:
set(mainGUI, 'WindowScrollWheelFcn', {@scrollfunc, gca})
it uses that function for EVERY aforementioned axes, regardless of what I program.

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!