I am attempting to iterate through a collection of controls on a
TabPage. As I iterate through them, I want to determine the type of
the control and then assign some property, i.e. radiobutton.checked =
False, TextBox.Text = "", etc.
I can get through both collections fine but once I determine the type,
do I have to cast the control to a radiobutton type to get it to
recognize the radio button properties?
fyi: TabEvents is a TabControl
Here's the code I have so far:
Dim MyTab as System.Windows.Forms.TabPage
Dim c as Control
For Each MyTab in TabEvents.TabPages
For Each c in MyTab.Controls
If c.GetType Is GetType(System.Windows.Forms.RadioButton) Then
????? How do I get my control to recognize the checked
property for a RadioButton ????