How can we help you today? How can we help you today?
haleyjason
I think you can probably come up with something using 2 different events and the producer consumer pattern of sorts. The 2 events i would try are the AfterExpanded (which you have) and the Invalidated (which will fire when the next node is ready). private void tree_Invalidated(object sender, InvalidateEventArgs e) { MessageBox.Show("Invalidated"); } private void MethodDependencyAfterExpand(object sender, TreeViewEventArgs e) { if (e.Action == TreeViewAction.Expand) { MessageBox.Show("After Expanded"); } } I was thinking something like the following would work: 1. expand a node and throw any children in a queue/list for processing (producer) 2. have a consumer of that queue/list that looks for nodes it should expand (the consumer will need to be wired to the queue/list so it knows when to process new items) 3. when the invalidated event fires, check for new nodes and put into queue/list to be processed 4. when expanded event fires, check for new nodes and put into queue/list to be processed Play around with the timing of those 2 events and you'll probably find what you need to know when to try and exapand a node once it is available. Buena Suerta / comments
I think you can probably come up with something using 2 different events and the producer consumer pattern of sorts. The 2 events i would try are the AfterExpanded (which you have) and the Invalid...
0 votes
Usually people ask was it written in VB or C# ... but these days it could be other languages. If an assembly was written in VB, chances are there is a reference to the Microsoft.VisualBasic dll. / comments
Usually people ask was it written in VB or C# ... but these days it could be other languages. If an assembly was written in VB, chances are there is a reference to the Microsoft.VisualBasic dll.
0 votes
Good to hear you figured out your roadblock. Once you get the code updated, I'll have to take a look at it. Always nice to see other ways of doing things. / comments
Good to hear you figured out your roadblock. Once you get the code updated, I'll have to take a look at it. Always nice to see other ways of doing things.
0 votes