Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controls in container form come over child form?

In a container form I have menu and buttons to open ther forms. enter image description here

Here I am facing a problem when I open any form these buttns and lables come over newly opened form. enter image description here

Please guide me how I can manage this issue? I want to open a new form and keep these container form's controls in back ground of it.

like image 510
haansi Avatar asked Dec 04 '22 23:12

haansi


1 Answers

I think I see what you did. You are using MDI and you put the menu labels and buttons on the MDI parent form. You did something with the MDI client window, it is normally dark-gray. Maybe you figured out how to change its BackColor or changed the Windows system color.

Yes, your screenshot is then the expected result. The problem is that MDI client forms are parented to the MDI client window. Which makes them show up behind the controls you put on the parent form.

There is no workaround for this, you are going to have to change your UI. To keep MDI, put a Panel on the parent form and set its Dock property to Left. Move the menu controls on that. The MDI client window will now shrink, occupying the remainder of the parent form. And the child forms will constrain themselves to that area. The wee painful bit is that you'll have to reorganize the menu to fit the much smaller space available in the panel.

like image 134
Hans Passant Avatar answered Dec 07 '22 13:12

Hans Passant