1

I have a parent and child form in Delphi. Parent form contains a TControlBar and on the top of ControlBar there are two Toolbars.

On one of the toolbars there is a button which is used to open the child form. When child form is displayed, top partion of the form goes below the control bar and top portion of the child form goes hidden below the parent form.

I think the problem is that my child form is using full part of the parent form as the display area.

To my knowledge, I think child form should use ClientWidth and ClientHeight as the display area. ClientWidth and Clientheight is automatically set.

I want child form to use the remaining area (other then toolbar) for display purpose.

Sertac Akyuz
  • 54,131
  • 4
  • 102
  • 169

1 Answers1

0

MDI child windows are children of the MDI client window, that's the window that you refer to as the 'remaining area'. Hence they cannot go above any other window parented by the form, like controlbars, toolbars, panels etc.. Additionally, MDI child windows are not constraint with the size of this MDI client window, you can think of the MDI client as an auto-scroll window. Child windows can be moved to overrun any of the edges and a scroll bar will appear to make it possible to restore a full view on them.

If I understand correctly what you want to do, you have to maximize the child windows. You can set the WindowState property of child windows to wsMaximized to that effect.

Sertac Akyuz
  • 54,131
  • 4
  • 102
  • 169