Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

groupBox border 1

Status
Not open for further replies.

bouwob

Programmer
Apr 12, 2006
171
US
I have a groubbox that containes a border and would like to have it removed.

I am using the groupbox to set up a set of radiobuttons but am getting design issues with not being able to remove the border.

Any ideas?
 
you will need to create a class that extends the group box and use it instead.

public class CustomGroupBox : System.Windows.Forms.GroupBox
{
public CustomGroupBox()
{
}

protected override void OnPaint(object sender, PaintEventArgs e)
{
e.Graphics.DrawRectangle(SystemPens.ControlDark, 0,0, this.Width - 1, this.Height - 1); //Draw a custom border

// base.Paint(e); //comment out this line
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top