Resize

[property icon] Resize

Form is resizable

Read-only This is a style property that is only available in the forms designer. It is possible to modify this programmatically through the Style property in the Create event.

Applies to: Form


[event icon] Resize() Event

Called when the user resizes the form

Applies to: Form

Introduced in KCML version 6.00


>Resize

Resize

When a form is resized a Resize() event will result. Control sizes and positions only change if anchoring is used. Otherwise controls can be moved manually by changing these properties within the event. Resizing will happen when the user resizes the form by dragging the edges, maximizes the form, or when the form is initially sized on startup. In the case of drag resizing, only one event is sent when the drag is finished (by releasing the mouse button).

On startup a Resize() event is guaranteed to be triggered before the Show() event, giving the programmer an opportunity to rearrange the controls in the Resize() handler before the form becomes visible.

A form can only be resized by the user if the Resize property is TRUE. The default is FALSE. This is a design time property that has no effect if set at runtime.

The appropriate Left, Top, Widthand Height properties for the form and individual controls are up to date when the event triggers.

See this example program for more about how a Resize() event handler can be used to move buttons when a form is resized at runtime.

See also

Form methods, properties and events.