Board index » Visual Studio » creating an inherited treeview, but InitializeComponent is not called?!?
|
mlsoup
|
creating an inherited treeview, but InitializeComponent is not called?!?
Visual Studio32
If someone could try this little test I would be most greatful: In a project, create a new class. Make this class inherit from TreeView Switch to designer mode and drop a ContextMenuStrip onto it. Switch back to code mode and it will have created the variable for ContextMenuStrip as you would expect, along with "Private Sub InitializeComponent" for all the initialization stuff. Now the problem is that normally the InitializeComponent sub is called from the New sub of the class. However, in this case there is no New sub because the designer hasn't created one, which means the initialization code is never called unless you manually add one. Is this just me being crazy, or is this a bug? Thanks in advance Kevin - |
