I have a GroupBox control that has a bunch of controls inside, but when I use the .Controls property, it's empty.
Is there another property that stores these controls?
EDIT: Here is the groupbox code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace CustomControls
{
public partial class CustomGroupBox : GroupBox
{
public CustomGroupBox ( )
{
this.OutlineColor = Color.FromArgb ( 5, 5, 5 );
this.Font = new Font ( "Tahoma", 8.25F, FontStyle.Regular );
}
Color outlineColor;
[DefaultValue ( typeof ( Color ), "5, 5, 5" )]
public Color OutlineColor
{
get { return outlineColor; }
set { outlineColor = value; Invalidate ( ); }
}
[DefaultValue ( typeof ( Font ), "Arial, 8.25pt" )]
public override Font Font
{
get { return base.Font; }
set { base.Font = value; }
}
protected override void OnPaint ( PaintEventArgs pe )
{
//painting
}
}
}