Y
Yoni Rabinovitch
I have an inheritance hierarchy of MDI child forms.
In the main MDIParent form, I have a splitter, with a TreeView on the
left side.
When clicking on a node in the tree, I want to be able to create a new
MDI child form, the Type of which is stored in the TreeNode.Tag
property.
My question is, is there a way I can determine the class of the new
form dynamically, instead of having a large "if else" with explicit
"new" statements for each kind of form I support ? Is there some way
to do this via a polymorphism ?
In the main MDIParent form, I have a splitter, with a TreeView on the
left side.
When clicking on a node in the tree, I want to be able to create a new
MDI child form, the Type of which is stored in the TreeNode.Tag
property.
My question is, is there a way I can determine the class of the new
form dynamically, instead of having a large "if else" with explicit
"new" statements for each kind of form I support ? Is there some way
to do this via a polymorphism ?