How do I disable the Zoom buttons in the figure toolbar?
8 views (last 30 days)
Show older comments
I would like to disable the Zoom buttons in the figure toolbar?
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
You can use the UISUSPEND command to suspend all the interactive properties of a figure. For more this function type:
help uisuspend
at the MATLAB command prompt.
To disable only the Zoom In and Zoom Out buttons in the figure toolbar, you can use the following code according to your version of MATLAB.:
For MATLAB 6.5 (R13) and MATLAB 6.5.1 (R13SP1):
figure_handle=figure(1)
handles=findall(figure_handle,'type','uitoggletool');
index=logical(strcmp(get(handles,'Tag'),'figToolZoomOut')+strcmp(get(handles,'Tag'),'figToolZoomIn'));
zoom_handles=handles(index);
set(zoom_handles,'enable','off');
For MATLAB 7.0 (R14) and later
Beginning in MATLAB 7.0 (R14) the "Tag" properties of the Zoom In and Zoom Out buttons changed as illustrated below.
figure_handle=figure(1)
handles=findall(figure_handle,'type','uitoggletool');
index=logical(strcmp(get(handles,'Tag'),'Exploration.ZoomOut')+strcmp(get(handles,'Tag'),'Exploration.ZoomIn'));
zoom_handles=handles(index);
set(zoom_handles,'enable','off');
0 Comments
More Answers (0)
See Also
Categories
Find more on Visual Exploration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!