Hi i just have a quick question.
I ran a search but i was not sure really how to word it correctly and couldnt find anything.
I would like to know how I can create a form object like a textbox, label or combo box from the one variable?
Obviously for a label it is easy by itself, i have just been doing..
public System.Windows. Forms.Label[,] obj_field_contr ol = new System.Windows. Forms.Label[19, 9];
but now i want to have this public declaration as a variant type array that allows me to create different objects depending on what i assign it. Is this only possible through inheritence?
I want to make it
public System.Windows. Forms.VariantOb jectThing[,] obj_field_contr ol = new System.Windows. Forms.VariantOb jectThing[19, 9];
and then simply be able to do
obj_field_contr ol[0, 0] = new System.Windows. Forms.TextBox() ;
obj_field_contr ol[0, 1] = new System.Windows. Forms.Label();
obj_field_contr ol[0, 2] = new System.Windows. Forms.ComboBox( );
I would appreciate any help :)
Thanks
I ran a search but i was not sure really how to word it correctly and couldnt find anything.
I would like to know how I can create a form object like a textbox, label or combo box from the one variable?
Obviously for a label it is easy by itself, i have just been doing..
public System.Windows. Forms.Label[,] obj_field_contr ol = new System.Windows. Forms.Label[19, 9];
but now i want to have this public declaration as a variant type array that allows me to create different objects depending on what i assign it. Is this only possible through inheritence?
I want to make it
public System.Windows. Forms.VariantOb jectThing[,] obj_field_contr ol = new System.Windows. Forms.VariantOb jectThing[19, 9];
and then simply be able to do
obj_field_contr ol[0, 0] = new System.Windows. Forms.TextBox() ;
obj_field_contr ol[0, 1] = new System.Windows. Forms.Label();
obj_field_contr ol[0, 2] = new System.Windows. Forms.ComboBox( );
I would appreciate any help :)
Thanks
Comment