Filter löschen
Filter löschen

Is there a way to change the MatLab default settings to default DockControls to off?

9 Ansichten (letzte 30 Tage)
Aside from typing out the dock controls, is there a way to change the default settings to "off" for DockControls?
% % % % % % % % % % % % % % % % % % %
% Maximazing figure to full screen
% % % % % % % % % % % % % % % % % % %
if ~verLessThan('matlab', '9.4')
set(UI.fig,'WindowStyle', 'normal','DockControls','off','WindowState','maximize','visible','on'), drawnow nocallbacks; %edited4.20
else
set(UI.fig,'visible','on')
drawnow nocallbacks; frame_h = get(UI.fig,'JavaFrame'); set(frame_h,'Maximized',1); drawnow nocallbacks;
end
DragMouseBegin

Antworten (1)

Torsten
Torsten am 21 Apr. 2022
Bearbeitet: Torsten am 21 Apr. 2022
From the documentation:
DockControlsInteractive figure docking
'on' (default) | 'off'
Interactive figure docking, specified as 'on' or 'off', or as numeric or logical 1 (true) or 0 (false). A value of 'on' is equivalent to true, and 'off' is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.
  • 'on' — Figure can be docked in the MATLAB® desktop. The Desktop > Dock Figure menu item and the Dock Figure button in the menu bar are enabled.
  • 'off' — MATLAB disables the Desktop > Dock Figure menu item and does not display the figure dock button.You cannot set the DockControls property to 'off' if the WindowStyle is set to 'docked'.
Setting the DockControls property is not supported in MATLAB Online™.
  2 Kommentare
Emma Walker
Emma Walker am 21 Apr. 2022
I have read the documentation you are referencing but it doesn't offer a method by which to change the default, merely to change an occurance. Matlab 2018a defaults to "on". I can and have been changing the logical manually in functions but how can I change the default so that this is no necessary going forward? Is there a way to modify the default setting on my machine // within my MatLab liscence?
Torsten
Torsten am 21 Apr. 2022
Bearbeitet: Torsten am 21 Apr. 2022
Maybe here:
or in the startup.m file.
Not an expert in MATLAB's internals, sorry.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by