473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

question about treeview

Hi ,

I have a question about generating treeview.Here is my code:
Public Class Form1
Inherits System.Windows.Forms.Form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim aa As New TreeNode(1)
Dim bb As New TreeNode(2)
Dim cc As New TreeNode(3)
Dim dd As New TreeNode(4)
aa.Nodes.Add(bb)
aa.Nodes.Add(cc)
bb.Nodes.Add(dd)
cc.Nodes.Add(dd)
TreeView1.Nodes.Add(aa)

End Sub

End Class

the rusult is:
4
|
1-2
|
3-4
but i hope the result is :
1-2-4
|
3-4
How should I change my code?

Thanks a lot,

Haiying

Nov 21 '05 #1
0 709

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: kidzero | last post by:
Hello, Is there any easy way to control treeview selection ? For example if user pushes button "next" treeview control selects next node. if user pushes button "prev" treeview control selects...
3
by: Peter | last post by:
Hello Thanks for reviewing my question. I would like to know how can I programmatically select a node Thanks in Advanc Peter
4
by: David Elliott | last post by:
Hi, I have a Windows Explorer-like treeview that displays directories. After a cut/paste operation, I want the treeview to display the folder where the paste happened. But, I'm running into a...
3
by: Michael C | last post by:
Hi all, Quick question about the TreeView control. I'm using code like this to determine the currently clicked TreeNode in the TreeView. private void MyTreeView_MouseDown(object sender,...
26
by: Michael A. Covington | last post by:
Suppose class X has some public properties, and class Y inherits from X. Is there a way that some of the public properties of X can be private (hidden) in Y (but still usable by the methods...
5
by: Brian | last post by:
I am "learning" C# and have run into a problem that, though I can work around it, I would like to know what the *right* way to handle the issue is. I have created an "Info" struct and assigned...
5
by: rh | last post by:
I created a user control that is made up of a TreeView and a VScrollBar. I set the TreeView.FullRowSelect = True and it works as expected (full row is visible, appears on top of everything else)...
5
by: Bart Schelkens | last post by:
Hi, i'm using the treeview from the Microsoft.Web.UI.Webcontrols.Treeview. It works fine. But my problem is that I don't get scrollbars if my treeview is too long or too wide for my frame....
0
by: Bart Schelkens | last post by:
Hi, I have this website and it consists of 3 frames. In my leftFrame I have a treeview. In my mainFrame I display the corresponding page. If I click in my treeview, my mainFrame displays the...
4
by: Manny Chohan | last post by:
Hey Guys, Quick question....how can we learn to make something like wat we have in MSDN Newsgroups forums. Something like clicking on + sign to see replies and click on a row and display the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.