On Thu, 06 Mar 2008 14:25:16 -0800, Tom <Thomas-911@earthlink.netwrote:
Quote:
[...] I have placed the following line at the beginning of
the Enter event handler:
>
Console.Writeline("tree.SelectedNode = {0}", tree.SelectedNode);
>
----------------------------------------------------
The problem >>>
>
When I tab into the tree control, above line output is:
>
tree.SelectedNode =
>
When I click into the tree control, the output is:
>
tree.SelectedNode = TreeNode: G:\
>
----------------------------------------------------
The "G" drive is correct for the folder selected. This subtle little
SelectedNode value difference is wreaking havoc on my code that
programmatically selects a previously saved folder location.
Well, when you tab into the control, is there actually a node selected?
Or is there simply a focus rectangle around one of the nodes?
I would expect the SelectedNode property to be a reliable source of
information regarding what's selected, if anything. So if it's not
returning a node, it seems likely that no node is selected at that moment.
Barring that, you should post a concise-but-complete code sample that
reliably demonstrates the problem you're having.
Pete