How to: Work with Tree View control
Loading...
6,963
Loading...
Uploader Comments (mkaatr)
see all
All Comments (10)
-
for fuck sake im so tired of find VB tuts. VB is outdated and is the nigger cereal brand programming language. Fuck this, and fuck you.
-
@mkaatr Hi! Well it's a part of the code you wrote with the document navigator but once I moved it into my program the error showed up in that code.
-
@mkaatr thanks so much. your teaching methods are incredible.
Loading...
Dim myNode As Windows.Forms.TreeNode yields an error message type Type 'windows,Form, treenode' is not defined. What does this mean?
ddsharper 1 year ago
@ddsharper
Hi there... long time no see. Hope you are doing fine. This error means that the compiler can't identify what this data type/class consist of and how to create it. This is kind of strange, since the Windows.Forms.TreeNode class is already provided for you to use. Can you give more details about it? For example, are you using this in a Module? a Class? and what is the Project Type you are using? is it a Class Library? Console App? or something else?
yours.
mkaatr 1 year ago
@mkaatr the red i box said to change it from 'windows,Form, treenode' to 'treenode' and when i did the error went away!! what do you think?
ddsharper 1 year ago
@ddsharper
Hi there...
The reason for the error is that there is some kind of conflict in the naming. VB.NET uses the name space to distinguish between different libraries that have the same name. For example you can have :
Module1.Test()
Module2.Test()
and you can still call any one of these even though they have the same name(Test).
As for the error itself. I think if we use "System.Windows.Forms.TreeNode" it will be more correct and the error will be gone as well.
yours
mkaatr 1 year ago
What code would you use to keep the tree expanded at all times? Would you add code to the form load property? Thank you.
ddsharper 1 year ago
@ddsharper
Hi there...
whenever you want to expand all the nodes, just call expandall. TreeView1.ExpandAll()
you can call this method after filling the tree in the form load event to make sure that the tree nodes appear expanded.
mkaatr 1 year ago