Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1878
WinGroupBox used as Panel
posted

Hi,

for layout purposes I wanted to use WinPanel but this is unfortunately not having any padding capabilities. Instead I now misapply WinGroupBox as a panel by setting the Text property to an empty string and the border to None. With the ContentPadding properties I can set the padding to the underlying controls which works fine so far.

Yesterdeay I detected that the WinGroupBox seems to have an initial padding of 1 pixel to the left, right and lower edge since when I add just one control, set Dock property to Fill, ContentPadding to 0,0,0,0, this control has Location set to 1,0, the width is 2 pixels smaller and the height 1 pixel smaller. If I do the same with a WinPanel (or MS panel) the underlying control will have exactly the same dimensions as the panel.

Is this a correct behavior or a bug? I would appreciate if the WinPanel would offer the possibility to set the padding since imho that is one of the basic features to expect from a panel. I wrote a feature request for it just this morning.

Regards,
Wolfgang