moveMdiClient(left: Real; top: Real; width: Real; height: Real);
The moveMdiClient method of the Form class can be used to position the client window, as required.
When a form is built as an MDI frame, it also automatically creates a child client window that covers the non-border area of the frame. Child MDI forms are placed inside this client window.
If the MDI frame is defined with controls, this client window may hide these controls. By default, an attempt is made to position the client window into the largest rectangular area that does not overlap any of the controls. This process works for most situations when the controls are positioned at the edges of the form client area; for example, a status line or toolbar control.
Use the moveMdiClient method if this positioning is not satisfactory. This method would normally be called from the resize event of the form. When this method has been called for an MDI frame, no automatic positioning of the client is attempted again, as this remains your responsibility.
The default positioning is performed only during the resize event of the MDI frame. Changing the visibility or position of a control belonging to the MDI frame has no impact on the position of the MDI client window.
The method in the following example positions the MDI client window below a toolbar control positioned at the top of the client area.
form_resize(); begin toolBar.width := clientWidth; toolBar.bevelOuterWidth := 1; toolBar.bevelInnerWidth := 1; // Set size of the mdi client window moveMdiClient(0, toolBar.height, clientWidth, clientHeight - toolBar.height); end;