Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Setup & Deployment project - "All User" installation Pin
Ruchi Gupta22-Apr-04 5:20
Ruchi Gupta22-Apr-04 5:20 
GeneralMulti images in each row in a listbox Pin
thomasa22-Apr-04 4:38
thomasa22-Apr-04 4:38 
GeneralRe: Multi images in each row in a listbox Pin
patnsnaudy22-Apr-04 4:52
patnsnaudy22-Apr-04 4:52 
GeneralInserting html code on a textbox control Pin
devgeez22-Apr-04 4:36
devgeez22-Apr-04 4:36 
GeneralRe: Inserting html code on a textbox control Pin
devgeez22-Apr-04 5:05
devgeez22-Apr-04 5:05 
GeneralRe: Inserting html code on a textbox control Pin
Heath Stewart22-Apr-04 5:09
protectorHeath Stewart22-Apr-04 5:09 
GeneralRe: Inserting html code on a textbox control Pin
Heath Stewart22-Apr-04 5:09
protectorHeath Stewart22-Apr-04 5:09 
GeneralLoading in old MFC Serialized files Pin
Simon Wren22-Apr-04 4:07
professionalSimon Wren22-Apr-04 4:07 
GeneralRe: Loading in old MFC Serialized files Pin
Heath Stewart22-Apr-04 4:10
protectorHeath Stewart22-Apr-04 4:10 
GeneralRe: Loading in old MFC Serialized files Pin
Simon Wren22-Apr-04 4:18
professionalSimon Wren22-Apr-04 4:18 
GeneralRe: Loading in old MFC Serialized files Pin
Heath Stewart22-Apr-04 4:28
protectorHeath Stewart22-Apr-04 4:28 
GeneralRe: Loading in old MFC Serialized files Pin
Simon Wren22-Apr-04 4:38
professionalSimon Wren22-Apr-04 4:38 
Generals Text Property in a TreeNode Pin
Bill Dean22-Apr-04 3:56
Bill Dean22-Apr-04 3:56 
Greetings all,

My goal: write a TreeNode class that contains another object and have the display text for the TreeNode be automatically set to some method on the object. Psuedo-ish code:
public class DerivedNode : System.Windows.Forms.TreeNode
{
	public MidTierClassLib.SomeClass oObject;
	public DerivedNode(MidTierClassLib.SomeClass SomeObject)
	{
		this.oObject = SomeObject;
	}
	public new string Text
	{
		get 
		{
			return (this.oObject.ToString ());
		}
	}
}


Trouble is: When I add a new DerivedNode to my TreeView, the text is blank. Stepping through in the debugger shows that the get clause is never called. This suggests I am barking up the wrong tree...

Ideally, I want to be able to change properties on oObject and have the display updated automagically. I am pretty green with using TreeViews and TreeNodes (pun intended)...couldn't find anything that looked like a databinding...so any guidance would be appreciated.

Thanks in advance,
Bill
GeneralRe: s Text Property in a TreeNode Pin
Judah Gabriel Himango22-Apr-04 4:03
sponsorJudah Gabriel Himango22-Apr-04 4:03 
GeneralRe: s Text Property in a TreeNode Pin
Bill Dean22-Apr-04 4:10
Bill Dean22-Apr-04 4:10 
GeneralRe: s Text Property in a TreeNode Pin
Heath Stewart22-Apr-04 4:14
protectorHeath Stewart22-Apr-04 4:14 
GeneralRe: s Text Property in a TreeNode Pin
Bill Dean22-Apr-04 4:24
Bill Dean22-Apr-04 4:24 
GeneralRe: s Text Property in a TreeNode Pin
Heath Stewart22-Apr-04 4:30
protectorHeath Stewart22-Apr-04 4:30 
GeneralRe: s Text Property in a TreeNode Pin
Bill Dean22-Apr-04 4:41
Bill Dean22-Apr-04 4:41 
GeneralCircular Buffer Technique question Pin
TimTM22-Apr-04 3:45
TimTM22-Apr-04 3:45 
GeneralRe: Circular Buffer Technique question Pin
Jeremy Kimball22-Apr-04 5:48
Jeremy Kimball22-Apr-04 5:48 
GeneralRe: Circular Buffer Technique question Pin
TimTM22-Apr-04 8:10
TimTM22-Apr-04 8:10 
GeneralRe: Circular Buffer Technique question Pin
scadaguy22-Apr-04 6:26
scadaguy22-Apr-04 6:26 
GeneralRe: Circular Buffer Technique question Pin
TimTM22-Apr-04 8:04
TimTM22-Apr-04 8:04 
GeneralRe: Circular Buffer Technique question Pin
scadaguy22-Apr-04 8:44
scadaguy22-Apr-04 8:44 

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.