I have a groupbox that dynamically loads radiobuttons horizontally. The problem that I'm having is that the "Width" property of the radiobutton stays the same regardless of what the "Text" property is. I've set the rdo.AutoSize = True and that still doesn't help. Below is the code that sets this up.
What am I doing wrong?
Thanks,
Code:
Dim iLeft As Integer = 13
For Each row As DataRow In EH.DataSet.Tables(0).Rows
Dim rdo As New RadioButton
rdo.Top = 19
rdo.Left = iLeft
rdo.Text = row("calibrationType")
rdo.Tag = row("calibrationType_ID")
rdo.Name = "rdo" & row("calibrationType_ID")
rdo.Font = New Font(rdo.Font, FontStyle.Regular)
rdo.AutoSize = True
iLeft += (rdo.Width + 2)
rdo.Size = New Point(19, iLeft)
grpCalibrationType.Controls.Add(rdo)
Next
Thanks,