The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,509 other followers

Archive for November 8th, 2011

c# – Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow

Posted by jpluimers on 2011/11/08

Every once in a a while I do WinForms development. On the .NET platform it still is the best way to create simple business applications that just, well: work.

WinForms apps are not fancy, but the actual users don’t care much, as long as they can their daily work done. They love fanciness of their mobile devices, but for stuff they use 8 hours a day, they just want something that works quickly, well and easily. So WinForms for a baseline is good.

WinForms historically has had two ways of automatically: Anchors and Dock (.NET 2 introduced another way using FlowLayoutPanel and TableLayoutPanel, but often they make things more complicated than needed).

One of the pitfalls of Docking is when you set Dock to Fill. Sometimes the affected control will be too large.
Every time that happens, I am baffled, as .NET is the only platform with that behaviour; I use other platforms too, and they don’t have this docking peculiarity (of course the have others, that’s the fun of using multiple platforms <g>).

The solution is simple:

  1. Right click on the control that misbehaves
  2. Choose “Bring to Front”
Done :)


Via: c# – Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow.

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development, VB.NET, WinForms | 2 Comments »

%d bloggers like this: