Problem with AfterSelect event in treeview

J

Janez

Hi,

I have a form with a button, treeview and listbox. If I click the
button, some data is retreived from the database and treeview is
filled with nodes. I also have AfterSelect eventhandler on the
treeview that displays some additional list of data in the listbox
when particular node is selected. The list contents is different for
parent and child node.
Here is the problem: if I click the button and fill the treeview and
after that select some child node in the treeview, Afterselect event
happens twice: first for the first parent node in the treeview and
immediately after that for the child node I have selected.
How can I prevent this first afterselect event from happening, because
I do not want to display listbox data for this parent node first if I
have only selected child node?

Best regards
Janez
 
A

AlexS

You can use other events like MouseDown and Select for keyboard navigation

HTH
Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top