.NET/C# WinForms: simple solution to Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow
Posted by jpluimers on 2011/11/02
It has been a while, but I have done some WinForms maintenance on business apps. For those kinds of apps, WinForms still is a productive environment, apart from one thing:
When you have a Dock of Fill, sometimes that control fills more than it should.
The reason is the order in which things are being calculated.
I always forget the trick, as other very productive environments for writing business apps don’t have this peculiarity (they have others, life is full of interesting peculiarities <g>).
- Right-Click on the control that has Dock=Fill
- Choose “Bring to Front”
Now it fills exactly the wanted area :)
Thanks Jeff Cuscutis for posting this concise solution.