Omid Golban
Member
- Joined
- Jun 3, 2003
- Messages
- 6
Hello all,
I want to loop through the controls and change some settings for certain types of controls. So I loop through Me.Controls, but then
this can have other controls that can contain other controls. The only way I know how to check this is:
If Me.Controls(i).GetType Is GetType(System.Windows.Forms.TabControl) ....
Using the above method, Id have to check for Tab controls, panels, etc. Tab controls themselves contain tab pages which in turn
contain other controls.
Is there any way of checking if a control can contain other controls without hard coding it like above? I.e. something like:
If Me.Controls(i).May_Contain_Other_Controls ....
Thank you,
Omid
I want to loop through the controls and change some settings for certain types of controls. So I loop through Me.Controls, but then
this can have other controls that can contain other controls. The only way I know how to check this is:
If Me.Controls(i).GetType Is GetType(System.Windows.Forms.TabControl) ....
Using the above method, Id have to check for Tab controls, panels, etc. Tab controls themselves contain tab pages which in turn
contain other controls.
Is there any way of checking if a control can contain other controls without hard coding it like above? I.e. something like:
If Me.Controls(i).May_Contain_Other_Controls ....
Thank you,
Omid