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

9 次查看(过去 30 天)
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

回答(1 个)

Torsten
Torsten 2022-4-21
编辑:Torsten 2022-4-21
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 个评论
Emma Walker
Emma Walker 2022-4-21
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?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by