Click here to Skip to main content
15,911,531 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How do you get the index of the currently selected item in a listview? Pin
Anonymous1-Oct-05 13:45
Anonymous1-Oct-05 13:45 
AnswerRe: How do you get the index of the currently selected item in a listview? Pin
watagal3-Oct-05 4:41
watagal3-Oct-05 4:41 
QuestionNeed help connecting and suggestions Pin
erikkl20001-Oct-05 10:48
erikkl20001-Oct-05 10:48 
AnswerRe: Need help connecting and suggestions Pin
rwestgraham1-Oct-05 14:08
rwestgraham1-Oct-05 14:08 
GeneralRe: Need help connecting and suggestions Pin
erikkl20001-Oct-05 14:12
erikkl20001-Oct-05 14:12 
GeneralRe: Need help connecting and suggestions Pin
rwestgraham1-Oct-05 15:53
rwestgraham1-Oct-05 15:53 
QuestionMore event troubles: SelectedIndexChanged Pin
watagal1-Oct-05 9:16
watagal1-Oct-05 9:16 
QuestionEvent: Treeview-AfterSelect Pin
watagal1-Oct-05 8:00
watagal1-Oct-05 8:00 
Greetings!

I'm having trouble with my treeview. Once I select a node from the treeview, it invokes the AfterSelect event, re-fills my nodes and the re-executes the AfterSelect event (again) - thus re-filling my node tree:
Private Sub uxGpDirectoryTree_AfterSelect( _
     ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) _
     Handles uxGpDirectoryTree.AfterSelect

     Me.StartDir += uxGpDirectoryTree.SelectedNode.Text + "\"
     call fillDirectoryTree()
 End Sub

 Private Sub fillDirectoryTree()
     Dim arrSubfolders() As DirectoryInfo
     arrSubfolders = New DirectoryInfo(Me.StartDir).GetDirectories

     uxGpDirectoryTree.Nodes.Clear()
     For Each subfolder As DirectoryInfo In arrSubfolders
         uxGpDirectoryTree.Nodes.Add(subfolder.Name)
     Next
 End Sub


I have debugged and it does cycle more than once. Any help would be greatly appreciated.

Thanks,
Karen

Nooobie to OOP and VB.Net 2005
AnswerRe: Event: Treeview-AfterSelect Pin
watagal1-Oct-05 9:06
watagal1-Oct-05 9:06 
AnswerRe: Event: Treeview-AfterSelect Pin
Dave Kreskowiak1-Oct-05 13:48
mveDave Kreskowiak1-Oct-05 13:48 
Questionvb key lock Pin
ankur6111-Oct-05 7:52
ankur6111-Oct-05 7:52 
AnswerRe: vb key lock Pin
Dave Kreskowiak1-Oct-05 13:45
mveDave Kreskowiak1-Oct-05 13:45 
GeneralRe: vb key lock Pin
ankur6111-Oct-05 20:32
ankur6111-Oct-05 20:32 
GeneralRe: vb key lock Pin
Dave Kreskowiak2-Oct-05 2:05
mveDave Kreskowiak2-Oct-05 2:05 
QuestionHelp needed with BeginInvoke Pin
grambowk1-Oct-05 2:50
grambowk1-Oct-05 2:50 
QuestionForms in VB.NET Pin
Arfan Qadir30-Sep-05 19:09
Arfan Qadir30-Sep-05 19:09 
AnswerRe: Forms in VB.NET Pin
Gopi.V30-Sep-05 22:43
Gopi.V30-Sep-05 22:43 
GeneralRe: Forms in VB.NET Pin
alongi3-Oct-05 5:36
alongi3-Oct-05 5:36 
QuestionHow can i get the value of Mathematical Function at any point? Pin
Arfan Qadir30-Sep-05 19:04
Arfan Qadir30-Sep-05 19:04 
AnswerRe: How can i get the value of Mathematical Function at any point? Pin
Dave Kreskowiak1-Oct-05 3:11
mveDave Kreskowiak1-Oct-05 3:11 
QuestionReceive FAX Pin
Tad McClellan30-Sep-05 14:49
professionalTad McClellan30-Sep-05 14:49 
QuestionKey event question Pin
KaptinKrunch30-Sep-05 10:42
KaptinKrunch30-Sep-05 10:42 
AnswerRe: Key event question Pin
Richard_Wolf30-Sep-05 11:32
Richard_Wolf30-Sep-05 11:32 
QuestionExporting a Datagrid to Excel Pin
raysot77730-Sep-05 9:15
raysot77730-Sep-05 9:15 
AnswerRe: Exporting a Datagrid to Excel Pin
Dave Kreskowiak30-Sep-05 9:27
mveDave Kreskowiak30-Sep-05 9:27 

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.