How to i remove the border line of a Group Box?

Category: c# general


code_warrior on Tue, 01 Dec 2009 10:50:36

Hi Friend,

How do i remove the border line of a group box?



Narayanan Dayalan on Tue, 01 Dec 2009 10:58:40

you cant remove the border in GroupBox... you can use panel (it dosent display borders)

Both do same operation... 

hope it helped...

Mushthaqu on Tue, 01 Dec 2009 11:03:17

Use the Panel Control instead.

Agalo on Tue, 01 Dec 2009 11:04:30

You can use panel and set its Border to none.

In case you still want to use groupbox, .Net do not provide border style property.
Therefore you can create you own groupbox, refer to following links:

saqwer on Wed, 14 Nov 2012 17:56:09

Both do same operation... 
hope it helped...
Actually, nope. The problem is that I need something the same with the same alignment (from top, left, right, bottom) that will still save alignment proportion even when the parent control will be stretched/contracted.

Raducu George on Mon, 16 May 2016 09:45:34

you can't, but if you really want to do it, a simple solution is to put a textbox in front of that line and then set for it enable=false. If you have some objects who are covered by it, use for them the method BringToFront(). Anyway... if you can, use a panel. 

HoytM on Thu, 03 Nov 2016 14:27:17

Search for "Panel Control" and do not find it in the tool box?

Fatih BAHCECI on Fri, 17 May 2019 09:29:05

myGroupBox.Paint += (sender, e) =>
    Graphics gfx = e.Graphics;
    var pp = sender as GroupBox;
    gfx.DrawString(pp.Text, pp.Font, new SolidBrush(pp.ForeColor), new PointF(7,0));