Description
If enabled, this event is generated when the configuration of an object (position and/or size) is about to change.
For a Form, the event is generated when the Form is resized or moved by the user.
For any object other than a Form, it can occur in one of two ways. Firstly, whenever a Form is resized, the system (by default) re-arranges its children so as to maintain their relative position and size. This generates a Configure event (if enabled) for each one of them.
Secondly, it can occur as a result of the user resizing the object directly. This facility is enabled by setting the object's Sizeable property to 1.
Note that a Configure event is not reported when an object is moved using "drag & drop". See Dragable (property) and DragDrop (event) for details of this operation.
The event message reported as the result of ⎕DQ, or supplied as the right argument to your callback function, is a 6-element vector as follows :
[1] | Object | ref or character vector |
[2] | Event | 'Configure' or 31 |
[3] | Y | y-position of top left corner |
[4] | X | x-position of top left corner |
[5] | H | height of object |
[6] | W | width of object |
For any object, the operation can be prevented by returning a scalar 0 from the callback function associated with the Configure event.
The user may choose a system option, described here as full-drag, whereby the contents of the window are re-arranged during a resize operation.
If you manage the geometry of your controls using the Attach property, APL honours full drag during resize, changing the size and position of your controls dynamically for you.
However, if you manage the geometry of controls using Configure event callbacks, you should consider the following.
The above restrictions apply to Configure events when full drag is enabled, but only when full drag is enabled. The behaviour of Configure callbacks with full drag disabled is the same as for other events.