Click here to Skip to main content
15,905,612 members
Home / Discussions / C#
   

C#

 
GeneralInput Class (XNA) Pin
MasterSharp7-Feb-08 16:34
MasterSharp7-Feb-08 16:34 
GeneralRe: Input Class (XNA) Pin
User 66587-Feb-08 23:16
User 66587-Feb-08 23:16 
GeneralUse mutex to find the multiple instance Pin
CodingLover7-Feb-08 15:22
CodingLover7-Feb-08 15:22 
GeneralRe: Use mutex to find the multiple instance Pin
Vikram A Punathambekar7-Feb-08 18:40
Vikram A Punathambekar7-Feb-08 18:40 
GeneralActive Directory time limit Pin
robot_rock7-Feb-08 14:31
robot_rock7-Feb-08 14:31 
GeneralRe: Active Directory time limit Pin
Ennis Ray Lynch, Jr.7-Feb-08 15:56
Ennis Ray Lynch, Jr.7-Feb-08 15:56 
GeneralRe: Active Directory time limit Pin
robot_rock7-Feb-08 22:14
robot_rock7-Feb-08 22:14 
GeneralTreeview Node Select Problem Pin
Rick van Woudenberg7-Feb-08 13:04
Rick van Woudenberg7-Feb-08 13:04 
Dear All,

I have a treeview with several parent and child node. If I click on a parent, I want to invoke a method. If I click on a child , I want to invoke another method. The same method for the parents , and the same method for the childs.

+ Parent Node 1
- Child node 1
- Child node 1
+ Parent Node 2
- Child node 1

This is the code I dreamed to achieve this. But .. for some reason it doesn't work. If I click on the child, it works .. however, the parent method is not fired when I click on the parent. Can somebody point me in the right direction with whatever it is that I'm doing wrong ?

 private void treeView_AfterSelect(object sender, TreeViewEventArgs e)<br />
         {<br />
            if (e.Node.Parent.IsSelected)<br />
            {<br />
                MessageBox.Show("This is the parent node");<br />
            }<br />
<br />
            else<br />
            {<br />
                MessageBox.Show("This is a child node");<br />
            }<br />
        }


Thanks Smile | :)
GeneralRe: Treeview Node Select Problem Pin
Christian Graus7-Feb-08 13:06
protectorChristian Graus7-Feb-08 13:06 
GeneralRe: Treeview Node Select Problem Pin
Rick van Woudenberg7-Feb-08 13:11
Rick van Woudenberg7-Feb-08 13:11 
GeneralRe: Treeview Node Select Problem Pin
Christian Graus7-Feb-08 13:14
protectorChristian Graus7-Feb-08 13:14 
GeneralRe: Treeview Node Select Problem Pin
Rick van Woudenberg7-Feb-08 13:22
Rick van Woudenberg7-Feb-08 13:22 
GeneralRe: Treeview Node Select Problem Pin
Rick van Woudenberg7-Feb-08 13:26
Rick van Woudenberg7-Feb-08 13:26 
GeneralRe: Treeview Node Select Problem Pin
Alan N8-Feb-08 2:07
Alan N8-Feb-08 2:07 
Generalobject or struct naming based on string variable Pin
tokyostormdrain7-Feb-08 12:45
tokyostormdrain7-Feb-08 12:45 
AnswerRe: object or struct naming based on string variable Pin
Guffa7-Feb-08 13:01
Guffa7-Feb-08 13:01 
Questionpassing arrays as arguments in C# Pin
Xarzu7-Feb-08 11:46
Xarzu7-Feb-08 11:46 
GeneralRe: passing arrays as arguments in C# Pin
pmarfleet7-Feb-08 11:49
pmarfleet7-Feb-08 11:49 
GeneralRe: passing arrays as arguments in C# Pin
Christian Graus7-Feb-08 12:04
protectorChristian Graus7-Feb-08 12:04 
AnswerRe: passing arrays as arguments in C# Pin
Eslam Afifi7-Feb-08 12:04
Eslam Afifi7-Feb-08 12:04 
AnswerRe: passing arrays as arguments in C# Pin
Guffa7-Feb-08 12:05
Guffa7-Feb-08 12:05 
GeneralRe: passing arrays as arguments in C# Pin
Ravenet7-Feb-08 16:17
Ravenet7-Feb-08 16:17 
GeneralBitwise masking - What's wrong with this code? [SOLVED] Pin
#realJSOP7-Feb-08 10:01
professional#realJSOP7-Feb-08 10:01 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
led mike7-Feb-08 10:07
led mike7-Feb-08 10:07 
GeneralRe: Bitwise masking - What's wrong with this code? Pin
Christian Graus7-Feb-08 10:08
protectorChristian Graus7-Feb-08 10:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.