int ControlsOnPanel = 0; Panel pnl = new Panel(); pnl.Left = 5; pnl.Top = ControlsOnPage * 21; pnl.BorderStyle = BorderStyle.None; pnl.BackColor = Color.AliceBlue; for (int i = 1; i <= numRadioButtons.Value; i++) { ControlsOnPage += 1; ControlsOnPanel += 1; EditableRadioButton rb = new EditableRadioButton(); rb.Margin = new Padding(7); rb.RadioButtonText = "Type text here"; rb.RadioButtonLabel = ControlsOnPage.ToString() + "."; rb.Top = (ControlsOnPanel * 21); rb.Left = 0; rb.Parent = pnl; pnl.Controls.Add(rb); pnl.Height = rb.Top+21; } pnlTarget.Controls.Add(pnl);
GroupBox
Panel
TabPage
Parent
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)