I have a question I couldn't readily find the answer to in the
archive. Here's the deal:
I have some GUI applications I have made with GUIDE, and need to have
the toolbar enabled so I can access the nifty pan and zoom and data
tip buttons (the figure property ToolBar is 'auto' for these).
However, this enables a pesky little save button (the disk icon).
Unless I make the GUI .fig file read-only, hitting this little button
will overwrite the .fig file with the current one, causing much
suffering and hellfire later.
So, is there anyway to:
1) disable that individual save button? I can't find any documentation
on this property.
OR:
2) create a toolbar with just the icons I want on it?
Any help is appreciated as always.
thanks,
Paul
Subject: Disabling SAVE button on GUIDE-generated GUIs
Paul <gtrpaul@gmail.com> wrote in message
<1191956628.072976.241220@r29g2000hsg.googlegroups.com>...
> I have a question I couldn't readily find the answer to in the
> archive. Here's the deal:
>
> I have some GUI applications I have made with GUIDE, and
need to have
> the toolbar enabled so I can access the nifty pan and zoom
and data
> tip buttons (the figure property ToolBar is 'auto' for these).
>
> However, this enables a pesky little save button (the disk
icon).
> Unless I make the GUI .fig file read-only, hitting this
little button
> will overwrite the .fig file with the current one, causing
much
> suffering and hellfire later.
>
> So, is there anyway to:
>
> 1) disable that individual save button? I can't find any
documentation
> on this property.
>
> OR:
>
> 2) create a toolbar with just the icons I want on it?
>
> Any help is appreciated as always.
>
> thanks,
> Paul
Here's how to disable the save button & menu option:
set(findall(gcf,'tag','Standard.SaveFigure'),'enable','off');
set(findall(gcf,'tag','figMenuFileSave'),'enable','off');
You can hide (instead of disable) these elements by setting
the 'visible' property instead of 'enable'.
AFAIK, these are undocumented/unsupported - TMW don't like
people playing around with their default menus/toolbars. It
work great, though.
> Here's how to disable the save button & menu option:
> set(findall(gcf,'tag','Standard.SaveFigure'),'enable','off');
> set(findall(gcf,'tag','figMenuFileSave'),'enable','off');
>
> You can hide (instead of disable) these elements by setting
> the 'visible' property instead of 'enable'.
Can you give the Tags for the other buttons e.g. Rotate 3D
Subject: Disabling SAVE button on GUIDE-generated GUIs
In article <g4avbs$e3m$1@fred.mathworks.com>,
Joerg <joerg.dickert@tu-dresden.de> wrote:
>> Here's how to disable the save button & menu option:
>> set(findall(gcf,'tag','Standard.SaveFigure'),'enable','off');
>> set(findall(gcf,'tag','figMenuFileSave'),'enable','off');
>Can you give the Tags for the other buttons e.g. Rotate 3D
(The -regexp part of the above findall selects only those items that have
a non-empty tag.)
--
"There is no greater calling than to serve your fellow men.
There is no greater contribution than to help the weak.
There is no greater satisfaction than to have done it well."
-- Walter Reuther
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.