movegui
Moves a figure to the specified position.
Syntax
movegui()
movegui(position)
movegui(h)
movegui(h, position)
movegui(h, event)
movegui(h, event, pos)
Inputs
- h
- Handle of a graphics object. If the graphics object is not a figure then its parent figure will be moved to the specified position.
- position
- Specifies the position of the figure. Valid values are one of the predefined strings or a 2-element real vector specifying the offset between the figure's window lower left corner and the lower left corner of the screen. If a negative value is passed then it is considered as the offset between the figure's window top right corner and the top right corner of the screen.
- event
- event is currently ignored.
Examples
Place figure at the top of the screen:
figure('windowstyle', 'undocked');
movegui('north');
Place figure at a 200 pixel offset from the left of the screen and 100 pixel offset from the top of the screen:
figure('windowstyle', 'undocked');
movegui([200 -100]);
Comments
In a setup with multiple monitors, the position is calculated relative to the monitor that the figure (or the better part of it) is currently in.
movegui has no effect if the figure is 'docked'.