Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What event tells me the user has selected a not in the TreeView?

1 view
Skip to first unread message

David Thielen

unread,
Nov 8, 2009, 6:30:24 PM11/8/09
to
AfterSelect gets fired when the tree is first populated even though
the user did not click on a node.

I need an event when the user single clicks on a leaf in the tree -
but not if they scroll and expand/collapse nodes.

thanks - dave

david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Message has been deleted

CSharpner

unread,
Nov 11, 2009, 3:20:49 PM11/11/09
to
One option is to set a value in the MouseClick event. Then, in your
AfterSelect event handler, check that value. If it hasn't been set,
you know this is the initial trigger, otherwise, it's a user initiated
event.

Alternatively, initialize a counter to zero in your constructor, then
in the AfterSelect event handler, check the value of the counter. If
it's zero, increment and bail. If it's above zero, it's a user
initiated event.

HTH
http://csharpner.blogspot.com

On Nov 8, 6:30 pm, David Thielen <thie...@nospam.nospam> wrote:
> AfterSelect gets fired when the tree is first populated even though
> the user did not click on a node.
>
> I need an event when the user single clicks on a leaf in the tree -
> but not if they scroll and expand/collapse nodes.
>
> thanks - dave
>

> david@at-at...@windward.dot.dot.net
> Windward Reports --http://www.WindwardReports.com
> me --http://dave.thielen.com
>
> Cubicle Wars -http://www.windwardreports.com/film.htm

Wilson, Phil

unread,
Nov 19, 2009, 12:48:45 PM11/19/09
to
I think I've detoured this by adding the events myself after the tree has
been populated.
--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"David Thielen" <thi...@nospam.nospam> wrote in message
news:22lef5t6kjdd9hlsr...@4ax.com...

0 new messages