Click here to Skip to main content
15,900,108 members
Home / Discussions / C#
   

C#

 
QuestionDesign Notepad with Forms Pin
pioneer_missile13-Aug-07 18:49
pioneer_missile13-Aug-07 18:49 
AnswerRe: Design Notepad with Forms Pin
N a r e s h P a t e l13-Aug-07 19:21
N a r e s h P a t e l13-Aug-07 19:21 
GeneralRe: Design Notepad with Forms Pin
Michael Sync13-Aug-07 19:48
Michael Sync13-Aug-07 19:48 
AnswerRe: Design Notepad with Forms Pin
help as an alias13-Aug-07 21:40
help as an alias13-Aug-07 21:40 
QuestionTreeView Control problem Pin
Adrian Soon13-Aug-07 17:27
Adrian Soon13-Aug-07 17:27 
AnswerRe: TreeView Control problem Pin
Luc Pattyn13-Aug-07 17:46
sitebuilderLuc Pattyn13-Aug-07 17:46 
GeneralRe: TreeView Control problem Pin
Adrian Soon13-Aug-07 19:54
Adrian Soon13-Aug-07 19:54 
AnswerRe: TreeView Control problem Pin
Hessam Jalali13-Aug-07 22:05
Hessam Jalali13-Aug-07 22:05 
You can find list expanding using AfterExpand and BeforeExpands events and from the e argument you can find the affected node and action

and the same approach works for check boxes with using AfterCheck and BeforeCheck events

public Form1()
{
    InitializeComponent();
    this.treeView1.BeforeExpand += new TreeViewCancelEventHandler(treeView1_BeforeExpand);
    this.treeView1.BeforeCheck += new TreeViewCancelEventHandler(treeView1_BeforeCheck);
}

void treeView1_BeforeCheck(object sender, TreeViewCancelEventArgs e)
{
    StringBuilder str=new StringBuilder();
    str.AppendFormat("[Check]   Name: {0}  CurrentStatus: {1}  NextStatus: {2}",e.Node.Text,e.Node.Checked.ToString(),(!e.Node.Checked).ToString());
    MessageBox.Show(str.ToString());
}

void treeView1_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
    StringBuilder str = new StringBuilder();
    str.AppendFormat("[Expand]   Name: {0}  CurrentStatus: {1}  NextStatus: {2}", e.Node.Text, e.Node.IsExpanded.ToString(), (!e.Node.IsExpanded).ToString());
    MessageBox.Show(str.ToString());
}


good luck
GeneralRe: TreeView Control problem [modified] Pin
Adrian Soon13-Aug-07 22:57
Adrian Soon13-Aug-07 22:57 
GeneralRe: TreeView Control problem Pin
Hessam Jalali13-Aug-07 23:02
Hessam Jalali13-Aug-07 23:02 
GeneralRe: TreeView Control problem Pin
Hessam Jalali14-Aug-07 0:31
Hessam Jalali14-Aug-07 0:31 
GeneralRe: TreeView Control problem Pin
Adrian Soon14-Aug-07 16:01
Adrian Soon14-Aug-07 16:01 
GeneralRe: TreeView Control problem [modified] Pin
Hessam Jalali16-Aug-07 20:42
Hessam Jalali16-Aug-07 20:42 
GeneralRe: TreeView Control problem Pin
Adrian Soon16-Aug-07 21:43
Adrian Soon16-Aug-07 21:43 
GeneralRe: TreeView Control problem Pin
Hessam Jalali16-Aug-07 21:52
Hessam Jalali16-Aug-07 21:52 
GeneralRe: TreeView Control problem Pin
Adrian Soon17-Aug-07 4:43
Adrian Soon17-Aug-07 4:43 
GeneralRe: TreeView Control problem Pin
Hessam Jalali17-Aug-07 6:04
Hessam Jalali17-Aug-07 6:04 
QuestionExplain: "Store by value instead of by reference" Pin
Richard Blythe13-Aug-07 15:50
Richard Blythe13-Aug-07 15:50 
AnswerRe: Explain: "Store by value instead of by reference" Pin
Luc Pattyn13-Aug-07 16:23
sitebuilderLuc Pattyn13-Aug-07 16:23 
GeneralRe: Explain: "Store by value instead of by reference" Pin
Richard Blythe13-Aug-07 16:49
Richard Blythe13-Aug-07 16:49 
GeneralRe: Explain: "Store by value instead of by reference" Pin
Luc Pattyn13-Aug-07 17:40
sitebuilderLuc Pattyn13-Aug-07 17:40 
QuestionTough ActiveX question Pin
newb2vb13-Aug-07 15:37
newb2vb13-Aug-07 15:37 
QuestionConsuming a Delphi COM EXE in Visual Studio C# App Pin
alias4713-Aug-07 14:59
alias4713-Aug-07 14:59 
Questionhow to detect remote input in c#? Pin
Inam Jameel13-Aug-07 13:29
Inam Jameel13-Aug-07 13:29 
AnswerRe: how to detect remote input in c#? Pin
Liam O'Hagan13-Aug-07 20:32
Liam O'Hagan13-Aug-07 20:32 

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.