I have a treeview control on a form with Scrollable=True.

If a user scrolls the list and then selects a node, the selected node
returned by the AfterSelect event is always the topmost visible node in the
list, not the node selected.

This also happens for the click event, but double-click works ok.

Can someone suggest a workaround for this behaviour?

RE: Treeview scroll problem by MikeH

MikeH
Fri Feb 18 20:07:03 CST 2005

Sorry,

I forgot to add that the behaviour only occurs when the vertical scrollbar
is visible. That is, when the treeview is larger than the available view.

"MikeH" wrote:

> I have a treeview control on a form with Scrollable=True.
>
> If a user scrolls the list and then selects a node, the selected node
> returned by the AfterSelect event is always the topmost visible node in the
> list, not the node selected.
>
> This also happens for the click event, but double-click works ok.
>
> Can someone suggest a workaround for this behaviour?

RE: Treeview scroll problem by BonnieBerentCMVP

BonnieBerentCMVP
Sat Feb 19 23:37:02 CST 2005

Mike,

What version of .NET are you using? This should work. It works fine for me
using 1.1 Framework with C#.

~~Bonnie

"MikeH" wrote:

> I have a treeview control on a form with Scrollable=True.
>
> If a user scrolls the list and then selects a node, the selected node
> returned by the AfterSelect event is always the topmost visible node in the
> list, not the node selected.
>
> This also happens for the click event, but double-click works ok.
>
> Can someone suggest a workaround for this behaviour?