Closable, Movable

For a form, these two properties determine whether the control menu contains entries for Close and Move. Without those entries, the user can't close the form by double-clicking in the corner and can't grab the form and move it. Setting Closable to .F. also causes the close ("X") button in the upper-right corner to be disabled.Movable also applies to grid columns and toolbars, and determines whether the user can move them around.

Usage

frmForm.Closable = lIsClosable
lIsClosable = frmForm.Closable
oObject.Movable = lIsMovable
lIsMovable = oObject.Movable
In VFP 3 and VFP 5, Closable and Movable both need to be .F. (as do a bunch of other items) in order to generate a form that has no border. See BorderStyle for the complete list. (In VFP 6 and later versions, TitleBar offers a faster way.)Movable controls only whether the user can move the object with the mouse. The object's position can be changed in code regardless of the setting of Movable. In a grid, if some columns are movable and others aren't, moving the ones that can be moved may have the effect of moving the columns that are supposedly immovable objects. Guess this constitutes an irresistible force.If a toolbar's Movable property is set to .F., the only way to dock and undock it is to double-click it. Frankly, we can't think of any reasons you'd ever want a toolbar to be immovable.

Example

ThisForm.Closable = .F.
ThisForm.Grid1.Column1.Movable = .F.

See Also

BorderStyle, ControlBox, MaxButton, MinButton, Sizable, TitleBar


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .