Effacer les filtres
Effacer les filtres

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

9 vues (au cours des 30 derniers jours)
Emma Walker
Emma Walker le 21 Avr 2022
Modifié(e) : Torsten le 21 Avr 2022
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

Réponses (1)

Torsten
Torsten le 21 Avr 2022
Modifié(e) : Torsten le 21 Avr 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 commentaires
Emma Walker
Emma Walker le 21 Avr 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 le 21 Avr 2022
Modifié(e) : Torsten le 21 Avr 2022
Maybe here:
or in the startup.m file.
Not an expert in MATLAB's internals, sorry.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by