I have a problem with docking. Here is the thing. I hope I can explain it well.
The design of the form is like this
The form
panelA -docked on top (there is a groupbox in this, it is also docked on top)
panelB -docked on top
tablist -docked fill
The thing is, panelB needs to be in the middle. The visibility of panelB is controlled by a combobox in panelA. So, when the user selects anything in combobox(in panelA), the panelB is visible and loaded with the associated user control.
The Document Outline is
The form
tablist
panelB
panelA
They are on the same level but not the same order with the design. I don’t know why.
The problem is, I make panelB visible=false in constructor, and make it visible again in combobox_selectedIndexChanged. But the panelB appears to be on top of panelA. After making it visible, this is how it looks;
the form
panelB
panelA
tablist
How can I fix this?
Try this sequence after making panelB visible to
true: