Re: Problem with AfterSelect event in treeview

Tech-Archive recommends: Fix windows errors by optimizing your registry



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

HTH
Alex

"Janez" <janezcas@xxxxxxxxx> wrote in message
news:c697ea9c.0507040205.78d4b037@xxxxxxxxxxxxxxxxxxxxx
> 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


.


Quantcast