Treeview problem!!!
-
My tree view generation is happening inside InitilizeComponent() it's System.Windows.Forms.TreeNode is local to InitilizeComponent() I want to make it's TreeNode private member variable of the same class. I did it is working fine but after any modification in GUI it is changing automatically. How to stop that??
Truth Is The Simplest !!!!
-
My tree view generation is happening inside InitilizeComponent() it's System.Windows.Forms.TreeNode is local to InitilizeComponent() I want to make it's TreeNode private member variable of the same class. I did it is working fine but after any modification in GUI it is changing automatically. How to stop that??
Truth Is The Simplest !!!!
-
My tree view generation is happening inside InitilizeComponent() it's System.Windows.Forms.TreeNode is local to InitilizeComponent() I want to make it's TreeNode private member variable of the same class. I did it is working fine but after any modification in GUI it is changing automatically. How to stop that??
Truth Is The Simplest !!!!
InitializeComponent() is clearly marked as being generated code that should not be modified. You should slap yourself for doing such a move. In your main code, you need to create your tree separately following the call to InitializeComponent(). I typically write a method for my own initialization and call it Initialize{something} --> in your case InitializeTreeview(); Then write that as part of your forms mainline code. Stay out of the designer. Don't ever touch it again. Or some midgit will be sent from the Programmer Police and he will slap your kneecaps silly.