Windows Develop Bookmark and Share   
 index > Windows Forms General > How can I add a margin to a GroupBoxPanel ?
 

How can I add a margin to a GroupBoxPanel ?

Hi all,

I put a GroupBox on a Form, but I noticed that the border of the groupbox is too near the borser of the Form.
I'd like that the border of the GroupBox were 10 pixel far from the border of the Form.
I tryed set the Padding or Margin properties of the GroupBox control, but it doesn't work.
I set the Dock property of the GroupBox as "Fill".
Any suggestion ?
Cheers.

Zoster
Zoster  Tuesday, March 04, 2008 8:22 AM

Hi,

Here's a suggestion:

Add a panel control to the form. Add the groupboxinthe Panel control and set the groupboxDock property to Fill. Set the Panel control's Padding property to your desiredvalues.

HTH,
Suprotim Agarwal

-----
http://www.dotnetcurry.com
http://www.sqlservercurry.com
-----

Suprotim Agarwal  Tuesday, March 04, 2008 8:50 AM

Hi,

Here's a suggestion:

Add a panel control to the form. Add the groupboxinthe Panel control and set the groupboxDock property to Fill. Set the Panel control's Padding property to your desiredvalues.

HTH,
Suprotim Agarwal

-----
http://www.dotnetcurry.com
http://www.sqlservercurry.com
-----

Suprotim Agarwal  Tuesday, March 04, 2008 8:50 AM

You can use google to search for other answers

Custom Search

More Threads

• How to raise button click event through code in c#.net?
• GDI+ Flickering (animation)
• What are the keycodes for these?
• Error when trying to open any file in vb.net
• How to choose filters for WMPlayer control?!
• IDE speed
• How can I disable a listBox item?
• Extract Superclass Refactoring on UserControl
• Windows XP Welcome Screen
• value and EditedFormattedValue confuse me