File Exchange Pick of the Week

Our best user submissions

Maximize your figures

Jiro’s pick this week is a new feature in R2018a to maximize/minimize the figure window.

For quite some time, people have created many entries for controlling the state of figure windows. Some of them set the figure position to match the size of the screen. Some even adjust the size so that the window does not overlap with the task bar. Other entries make use of the underlying JavaFrame.

R2018a now provides documented figure and uifigure property called WindowState. The property takes one of the following 4 strings:

  • 'normal' (default) – The normal state of figure windows.
  • 'maximized' – Same as clicking on the maximize button on the figure.
  • 'minimized' – Same as clicking on the minimize button on the figure.
  • 'fullscreen' – Fills the screen with the minimize, restore, close button hidden.
f = figure;
f.WindowState = 'maximized';

Comments

Give it a try and let us know what you think here.




Published with MATLAB® R2018a

|
  • print

コメント

コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。