D
Darkgroove
Guest
I have an issue with my project, the code below directly affects it.
What is supposed to happen:
User clicks a node on Treeview1. The information stored by pressing the save button previously is brought into 2 textboxes, and a label is used to specify a piece of text.
What is happening:
After pressing the save button, and clicking on another node, the textboxes don't change to the stored figure. They remain blank.
There's no errors. What have I done wrong?
What is supposed to happen:
User clicks a node on Treeview1. The information stored by pressing the save button previously is brought into 2 textboxes, and a label is used to specify a piece of text.
What is happening:
After pressing the save button, and clicking on another node, the textboxes don't change to the stored figure. They remain blank.
There's no errors. What have I done wrong?
Code:
Private Sub gSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gSave.Click
SaveSetting("SwimmingAp", TreeView1.SelectedNode.Parent.ToString, TreeView1.SelectedNode.ToString, cTime.Text)
SaveSetting("SwimmingAp", TreeView1.SelectedNode.Parent.ToString, TreeView1.SelectedNode.ToString, gDate.Text)
End Sub
Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
cTime.Clear()
gDate.Clear()
gEvent.Text = "Event: " & TreeView1.SelectedNode.Text & " " & TreeView1.SelectedNode.Parent.Text
cTime.Text = GetSetting("SwimmingAp", TreeView1.SelectedNode.Parent.ToString, TreeView1.SelectedNode.ToString, cTime.Text)
gDate.Text = GetSetting("SwimmingAp", TreeView1.SelectedNode.Parent.ToString, TreeView1.SelectedNode.ToString, gDate.Text)
End Sub