Title: Message
If ur tree looks like this
 
|
|__Make
|
|__Model
|
|__Opening
|
|__Allison
|
|__1000 EVS
|
|__Right
 
What you could do is store each of the mouse down in a string, When a item is pressed in the tree, just change the color of that item
into Red and store that in a string, now with the next click make the next string as red and store that in a string, once u have both the
strings use some condition statment. If there is a third click on the mouse then release both the redcolors and make the 2 strings emtpy.
 
So eventually u will have.
 
1) 1st Press 1000 Evs will become Red, It will be stored in string1
2) 2nd Press Right will become Red, It will be stored in string 2.
3) When the submit button is clicked, u check for both the string, if it satisfies ur condition then write your code.
4) If there is more than 2 clicks, release the color and the strings and wait for step 1 and step 2.
 
Using the red color will make the UI more easy to understand.
 
Regards
Tarakeshwar
 
-----Original Message-----
From: Stephen the Cook [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 8:20 PM
To: [EMAIL PROTECTED]
Subject: RE: [Microsofts_C_Sharp] Treeview

Thanks,  That is a good start.  Would you trap all of the hits as people went down the tree using stringbuilder?
 
I have Make | Model | Opening
 
Allison  | 1000 EVS | RIGHT
 
I need to trap 1000 EVS & Right in this case.
 
So how would I grab the 2 items?
 
 

Stephen Russell
S.R. & Associates
Memphis, TN 38115

901.246-0159

-----Original Message-----
From: Tarakeshwar L [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 8:15 AM
To: [EMAIL PROTECTED]
Subject: RE: [Microsofts_C_Sharp] Treeview

Hi,
 
You can use the mouse down event to find out which node has been clicked by the user.
 
private void treeView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
    TreeNode selectedNode = null;
    selectedNode = treeView1.GetNodeAt(e.X,e.Y);
}
 
The selectedNode will contain the Node that was clicked by the user.
 
 
Regards,
Tarakeshwar
 
-----Original Message-----
From: Stephen the Cook [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 6:21 PM
To: [EMAIL PROTECTED]
Subject: [Microsofts_C_Sharp] Treeview

How do I grab where the user clicked in a 4 node tree? 

Am I looking for a series like 5,2,4,1 or am I going to each node by
name and diong it there?

TIA

Stephen Russell
S.R. & Associates
Memphis, TN 38115

901.246-0159



Yahoo! Groups Sponsor

Get unlimited calls to

U.S./Canada



Yahoo! Groups Links

Reply via email to