Wednesday, October 3, 2012

[WinForm] Panel with dock "Fill" value is under "Top" docked panel

If you have header panel which should dock to the Top in the form and if you want to add new panel which will fill the rest of the form, you can get into problem because docking is calculated only by previous siblings in the document, and you can get document structure like this:

You can see that main panel (red border) is filled the whole form, not just remaining space. Easy fix is to right click main panel and click "Bring to front" or to move it before in document hierarchy (you can get this window in View - Other Windows - Document Outline.

No comments:

Post a Comment