Clear Filters
Clear Filters

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

9 views (last 30 days)
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

Answers (1)

Torsten
Torsten on 21 Apr 2022
Edited: Torsten on 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 Comments
Emma Walker
Emma Walker on 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?

Sign in to comment.

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!