Click here to Skip to main content
15,916,527 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: text box value to double Pin
Christian Graus23-Feb-05 9:39
protectorChristian Graus23-Feb-05 9:39 
Generalvb.net and sql 2000 Pin
Member 107391923-Feb-05 6:16
Member 107391923-Feb-05 6:16 
GeneralRe: vb.net and sql 2000 Pin
Colin Angus Mackay24-Feb-05 0:24
Colin Angus Mackay24-Feb-05 0:24 
GeneralRe: vb.net and sql 2000 Pin
Member 107391924-Feb-05 8:32
Member 107391924-Feb-05 8:32 
Generalowner drawn combo box focus rectangle Pin
Anonymous23-Feb-05 6:06
Anonymous23-Feb-05 6:06 
QuestionUSB Card Reader. How to read data from usb into string? Pin
Member 116828123-Feb-05 5:02
Member 116828123-Feb-05 5:02 
AnswerRe: USB Card Reader. How to read data from usb into string? Pin
Dave Kreskowiak23-Feb-05 6:33
mveDave Kreskowiak23-Feb-05 6:33 
GeneralTreeview Help Pin
RoedRunner23-Feb-05 3:56
RoedRunner23-Feb-05 3:56 
I have created a TreeView (Treeview1) that contains 4 levels. I am trying to create a sub so that when the user clicks the button on the form, The code will cycle through the items that are checked and print their tag properties to a textbox. The For Each statement works fine, but I am having trouble cycling through the children and their children etc. I am still working on the first level of children because it should be the same principle for the rest of the children. Here is what I have so far, although it only prints the tags for the nodes listed in the first For Each statement.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreate.Click

Dim node As TreeNode
For Each node In TreeView1.Nodes
If node.Checked = True Then
txtNote.Text = txtNote.Text & node.Tag & vbCrLf

Dim myNodeCollection As TreeNodeCollection = TreeView1.Nodes(node.Index).Nodes
Dim myCount As Integer = myNodeCollection.Count
Dim child1 As Integer

For child1 = 0 To myCount - 1
If TreeView1.Nodes(node.Index).Nodes(child1).Checked = True Then
txtNote.Text = txtNote.Text & TreeView1.Nodes(node.Index).Nodes(child1).Tag & " "
End If
Next
End If
Next node

End Sub

Any assistance would be appreciated.

Thanks.

Marc
GeneralRe: Treeview Help Pin
Dave Kreskowiak23-Feb-05 4:49
mveDave Kreskowiak23-Feb-05 4:49 
GeneralRe: Treeview Help Pin
RoedRunner23-Feb-05 4:53
RoedRunner23-Feb-05 4:53 
GeneralRe: Treeview Help Pin
RoedRunner23-Feb-05 5:25
RoedRunner23-Feb-05 5:25 
GeneralRe: Treeview Help Pin
Dave Kreskowiak23-Feb-05 5:47
mveDave Kreskowiak23-Feb-05 5:47 
GeneralRe: Treeview Help Pin
RoedRunner23-Feb-05 7:20
RoedRunner23-Feb-05 7:20 
GeneralCustom ComboBox Problem Pin
Jason Stamp23-Feb-05 3:56
Jason Stamp23-Feb-05 3:56 
GeneralRe: Custom ComboBox Problem Pin
j45mw12-Mar-05 17:39
j45mw12-Mar-05 17:39 
GeneralDatagrind i win applications Pin
Member 31636123-Feb-05 2:33
Member 31636123-Feb-05 2:33 
GeneralRe: Datagrind i win applications Pin
Jim Matthews23-Feb-05 3:36
Jim Matthews23-Feb-05 3:36 
QuestionHow to print a grid Pin
pdcoope23-Feb-05 2:21
pdcoope23-Feb-05 2:21 
AnswerRe: How to print a grid Pin
Dave Kreskowiak23-Feb-05 4:18
mveDave Kreskowiak23-Feb-05 4:18 
GeneralRe: How to print a grid Pin
Anonymous23-Feb-05 7:05
Anonymous23-Feb-05 7:05 
AnswerRe: How to print a grid Pin
Just Greeky Creek23-Feb-05 4:35
Just Greeky Creek23-Feb-05 4:35 
GeneralRe: How to print a grid Pin
Anonymous23-Feb-05 7:06
Anonymous23-Feb-05 7:06 
GeneralAudio mute Pin
sneffe123-Feb-05 2:02
sneffe123-Feb-05 2:02 
GeneralRe: Audio mute Pin
Dave Kreskowiak23-Feb-05 4:08
mveDave Kreskowiak23-Feb-05 4:08 
GeneralPop up menu Pin
Anonymous23-Feb-05 1:34
Anonymous23-Feb-05 1:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.