Contents Previous Next Subchapters

Getting and Setting a Window's Geometry
Syntax windowgeometry(caption)
windowgeometry(captiongeometry)
See Also isicon , adddialog , addtable , addeditor , gaddwin

Description
Returns or sets the position and size of a window.

windowgeometry(
caption)
Returns the current geometry of the window with the specified caption . If the window is currently displayed as an icon or in full screen mode, the geometry corresponds to when the window was last displayed in normal mode.

windowgeometry(
captiongeometry)
If the second argument geometry is present, the window geometry is set to the specified value and the return value corresponds to the geometry before this change.

Examples
If you enter
     windowgeometry("Graphic 0")
O-Matrix will print a four element integer row vector in which the first element is the right coordinate of the start of the window, the second element is the down coordinate of the windows start, the third element is its width, and the fourth element is its height. If you enter
     g = windowgeometry("Command")
     g(1) = 1
     g(2) = 1
     windowgeometry("Command", g)
O-Matrix will move the command window to the upper left corner of the work space.