Home » Category » NET Architecture & Design

NET Architecture & Design: treeview control select node not working

205| Tue, 20 May 2008 08:58:00 GMT| anonymous| Comments (3)
i have a treeview control with numerous nodes. when i left mouse click a node, a different windows form is supposed to show depending on the mode clicked. thus, i can display numerous windows forms in my app by just clicking on the relevant treeview node. I click a given node the first time & the window shows. But when I click the same node subsequent times the selected node intermittently does not show the appropriate screen. the cursor "sticks" on the selected node but no window shows. I often can get the window to show by clicking on another node, showing that window & then re-clicking on the node that stuck. does anybody know why this treeview node "fatigue" is happening.

debug code indicates when the node "sticks" that the treeview "afterselect" event is not firing. when the selection works properly the afterselect event does fire.

thanks,

dave

Keywords & Tags: treeview, control, select, node, working, net, architecture, design

URL: http://dotnet.itags.org/dotnet-architecture-design/119487/
 
«« Prev - Next »» 3 helpful answers below.
Post some code as that may show something.
--
William Stacey, MVP

"daver" <daver...discussions.microsoft.com> wrote in message
news:A15A9811-2E06-4DD3-82D2-223C187E14F5...microsoft.com...
> i have a treeview control with numerous nodes. when i left mouse click a
node, a different windows form is supposed to show depending on the mode
clicked. thus, i can display numerous windows forms in my app by just
clicking on the relevant treeview node. I click a given node the first time
& the window shows. But when I click the same node subsequent times the
selected node intermittently does not show the appropriate screen. the
cursor "sticks" on the selected node but no window shows. I often can get
the window to show by clicking on another node, showing that window & then
re-clicking on the node that stuck. does anybody know why this treeview node
"fatigue" is happening.
> debug code indicates when the node "sticks" that the treeview
"afterselect" event is not firing. when the selection works properly the
afterselect event does fire.
> thanks,
> dave

william | Tue, 20 May 2008 08:59:00 GMT |

Once a node is selected, subsequent clikcs on that node will not generate
the AfterSelect event since it is already selected. You will probably have
to sink the Click event and use it to see if a node is selected, then pop up
your relevant form for that node. So if you examine the documenhtation for
the TreeView class, the AfterSelect event is documented as "Occurs after the
tree node is selected". So once selected, subsequent clicks do not raise
this event. This is one of the distinctions between the dotNet treeview and
the COM treeview's NodeClick event which is raised every time the node i
licked.

"daver" <daver...discussions.microsoft.com> wrote in message
news:A15A9811-2E06-4DD3-82D2-223C187E14F5...microsoft.com...
> i have a treeview control with numerous nodes. when i left mouse click a
node, a different windows form is supposed to show depending on the mode
clicked. thus, i can display numerous windows forms in my app by just
clicking on the relevant treeview node. I click a given node the first time
& the window shows. But when I click the same node subsequent times the
selected node intermittently does not show the appropriate screen. the
cursor "sticks" on the selected node but no window shows. I often can get
the window to show by clicking on another node, showing that window & then
re-clicking on the node that stuck. does anybody know why this treeview node
"fatigue" is happening.
> debug code indicates when the node "sticks" that the treeview
"afterselect" event is not firing. when the selection works properly the
afterselect event does fire.
> thanks,
> dave

roy | Tue, 20 May 2008 09:00:00 GMT |

Roy:

I am talking about the initial click of a node, not a subsequent click of
the same node which has already just been selected. The problem is when I
click a new node, having just left the previously selected node.

"Roy Soltoff" wrote:

> Once a node is selected, subsequent clikcs on that node will not generate
> the AfterSelect event since it is already selected. You will probably have
> to sink the Click event and use it to see if a node is selected, then pop up
> your relevant form for that node. So if you examine the documenhtation for
> the TreeView class, the AfterSelect event is documented as "Occurs after the
> tree node is selected". So once selected, subsequent clicks do not raise
> this event. This is one of the distinctions between the dotNet treeview and
> the COM treeview's NodeClick event which is raised every time the node i
> licked.
> "daver" <daver...discussions.microsoft.com> wrote in message
> news:A15A9811-2E06-4DD3-82D2-223C187E14F5...microsoft.com...
> > i have a treeview control with numerous nodes. when i left mouse click a
> node, a different windows form is supposed to show depending on the mode
> clicked. thus, i can display numerous windows forms in my app by just
> clicking on the relevant treeview node. I click a given node the first time
> & the window shows. But when I click the same node subsequent times the
> selected node intermittently does not show the appropriate screen. the
> cursor "sticks" on the selected node but no window shows. I often can get
> the window to show by clicking on another node, showing that window & then
> re-clicking on the node that stuck. does anybody know why this treeview node
> "fatigue" is happening.
> >
> > debug code indicates when the node "sticks" that the treeview
> "afterselect" event is not firing. when the selection works properly the
> afterselect event does fire.
> >
> > thanks,
> >
> > dave
>
>

daver | Tue, 20 May 2008 09:01:00 GMT |

NET Architecture & Design Hot Answers

NET Architecture & Design New questions

NET Architecture & Design Related Categories