Click here to Skip to main content
15,913,709 members
Home / Discussions / C#
   

C#

 
GeneralRe: how can i do this Controls c# Pin
Ankur\m/29-May-10 0:41
professionalAnkur\m/29-May-10 0:41 
GeneralRe: how can i do this Controls c# Pin
OriginalGriff29-May-10 0:43
mveOriginalGriff29-May-10 0:43 
Questiondelegate invocation Pin
xilefxilef28-May-10 20:06
xilefxilef28-May-10 20:06 
AnswerRe: delegate invocation Pin
Moreno Airoldi28-May-10 22:36
Moreno Airoldi28-May-10 22:36 
AnswerRe: delegate invocation Pin
PIEBALDconsult29-May-10 3:20
mvePIEBALDconsult29-May-10 3:20 
GeneralRe: delegate invocation Pin
xilefxilef29-May-10 18:34
xilefxilef29-May-10 18:34 
GeneralRe: delegate invocation Pin
Moreno Airoldi29-May-10 21:05
Moreno Airoldi29-May-10 21:05 
GeneralRe: delegate invocation Pin
xilefxilef30-May-10 0:07
xilefxilef30-May-10 0:07 
********************************************************
public class MyTreeNode: TreeNode
{...

public MyTreeNode(TagObject obj)
{
...
this.Tag = obj;
obj.TextChanged += new EventHandler(UpdateText);
...
}


public void UpdateTagText(string text)
{
((TagObject)this.Tag).Name = text;
}


public void UpdateText(object sender, EventArgs e)
{
this.Text = ((TextChangedEventArgs)e).Text; System.Diagnostics.Debug.WriteLine(((TagObject)this.Tag).c++.ToString());
}...

***********************************************************************

public class TagObject
{
public event EventHandler TextChanged;
private string name;
public int c = 0;
...

public string Name
{
get { return this.name; }
set
{
this.SetName(value);
}
}

// Invoke the TextChanged event when text changes
public void OnTextChanged(TextChangedEventArgs e)
{
if (TextChanged != null)
TextChanged(this, e);
}


private void SetName(string text)
{
this.name = text;
TextChangedEventArgs ea = new TextChangedEventArgs();
ea.Text = text;
OnTextChanged(ea);
}...

}

public class TextChangedEventArgs : EventArgs
{
private string text;

public string Text
{
get { return this.text; }
set { this.text = value; }
}


}


*****************************************************************
from the form class that contains my treeview:
...
private void treeView_AfterLabelEdit(object sender, NodeLabelEditEventArgs e)
{
((MyTreeNode)e.Node).UpdateTagText(e.label);
}
...
GeneralRe: delegate invocation Pin
Moreno Airoldi30-May-10 2:36
Moreno Airoldi30-May-10 2:36 
GeneralRe: delegate invocation Pin
PIEBALDconsult30-May-10 6:21
mvePIEBALDconsult30-May-10 6:21 
GeneralRe: delegate invocation Pin
xilefxilef30-May-10 19:26
xilefxilef30-May-10 19:26 
GeneralRe: delegate invocation Pin
xilefxilef30-May-10 20:07
xilefxilef30-May-10 20:07 
QuestionDebugging a Native DLL From a C# Assembly Pin
Richard Andrew x6428-May-10 11:33
professionalRichard Andrew x6428-May-10 11:33 
AnswerRe: Debugging a Native DLL From a C# Assembly Pin
William Winner28-May-10 11:42
William Winner28-May-10 11:42 
AnswerRe: Debugging a Native DLL From a C# Assembly Pin
Luc Pattyn28-May-10 11:56
sitebuilderLuc Pattyn28-May-10 11:56 
GeneralRe: Debugging a Native DLL From a C# Assembly Pin
Richard Andrew x6428-May-10 12:00
professionalRichard Andrew x6428-May-10 12:00 
GeneralRe: Debugging a Native DLL From a C# Assembly Pin
Luc Pattyn28-May-10 12:02
sitebuilderLuc Pattyn28-May-10 12:02 
QuestionExcel Problem Pin
snouto28-May-10 10:43
snouto28-May-10 10:43 
AnswerRe: Excel Problem Pin
William Winner28-May-10 11:39
William Winner28-May-10 11:39 
GeneralRe: Excel Problem Pin
snouto28-May-10 11:59
snouto28-May-10 11:59 
GeneralRe: Excel Problem Pin
Eddy Vluggen29-May-10 0:37
professionalEddy Vluggen29-May-10 0:37 
QuestionDateTimePicker as only Time Picker help - need dropdown to only show times (not calendar) or show nothing at all Pin
roman_s28-May-10 8:53
roman_s28-May-10 8:53 
AnswerRe: DateTimePicker as only Time Picker help - need dropdown to only show times (not calendar) or show nothing at all Pin
Alan N28-May-10 11:05
Alan N28-May-10 11:05 
AnswerRe: DateTimePicker as only Time Picker help - need dropdown to only show times (not calendar) or show nothing at all Pin
Isaac Gordon29-May-10 2:04
Isaac Gordon29-May-10 2:04 
QuestionFighting for Top-Most Window in WinCE Pin
notsotragichero28-May-10 6:51
notsotragichero28-May-10 6:51 

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.