maxfig

MAXimize a FIGure to fill the screen.

Contents

Syntax

maxfig(fig,monitor,mode)

Description

Subsequent calls will restore the maximized figure to its previous state.

"fig" (first numeric input) is the handle of the figure to maximize (default is current figure).

"monitor" (second numeric input) (Default=1) is an integer corresponding to a monitor. Monitor numbering is defined by the row number of the corresponding monitor in the root property 'MonitorPositions'.

"mode" is a string specifying whether to fully maximize the figure (borders extend beyond the monitor, menu and tool bars are removed) or set to normal mode with borders, menu & toolbars displayed. Value for maximize mode is any of {m,max,y,yes,t,true}(default). Value for normal mode is any of {n,normal,no,f,false}.

Uses getmondim.m.
Extended monitors can have a different resolution from the primary monitor. Placement and size of the taskbar on the primary monitor can be changed in the code, see commented sections.

Will work with docked figures. Inspired by MAXFIGSIZE (ID 3036) by Duane Hanselman. The figure properties, TAG and USERDATA, are used to keep track of the maximized figure.

Examples:

maxfig
maxfig(3,2)
maxfig([],3)
maxfig('normal')