How to assign a control by its type?
I have a collection of Control "TargetControls"
List<Control> TargetControls = new List<Control>(); foreach (Control page in Tabs.TabPages) { foreach (Control SubControl in page.Controls) TargetControls.Add(SubControl); } foreach (Control ctrl in TargetControls)...
I need to access every existing control (combobox, checkbox, etc.) by its specific type with access to its specific properties. The way I do it now gives me access to common management properties.
Could I indicate something like ...
Combobox current = new ComboBox ["Name"]; /// Link to the ComboBox instance 'Name'
and then access its (already existing) properties for manipulation?
source share