Click here to Skip to main content
15,889,840 members
Home / Discussions / C#
   

C#

 
GeneralRe: Game Programming with C# Pin
Judah Gabriel Himango24-Apr-04 13:24
sponsorJudah Gabriel Himango24-Apr-04 13:24 
GeneralRe: Game Programming with C# Pin
CWIZO24-Apr-04 23:56
CWIZO24-Apr-04 23:56 
GeneralRe: Game Programming with C# Pin
Jeff Varszegi25-Apr-04 7:14
professionalJeff Varszegi25-Apr-04 7:14 
GeneralRe: Game Programming with C# Pin
Judah Gabriel Himango27-Apr-04 19:21
sponsorJudah Gabriel Himango27-Apr-04 19:21 
GeneralRe: Game Programming with C# Pin
Jeff Varszegi28-Apr-04 2:11
professionalJeff Varszegi28-Apr-04 2:11 
GeneralRe: Game Programming with C# Pin
leppie25-Apr-04 0:08
leppie25-Apr-04 0:08 
GeneralTanks for the Ansers... Pin
Snews25-Apr-04 3:58
Snews25-Apr-04 3:58 
GeneralTree Data Structure Pin
William Blasko24-Apr-04 9:40
William Blasko24-Apr-04 9:40 
I'm trying to create a Tree data structure whose externally revealed methods and properties will behave much like the System.Windows.Forms.TreeView. I noticed something strange, and I'm not sure how one would go about doing it. It could just be that I'm missing something simple, however.

You can do the following...

<br />
TreeView tv = new TreeView();<br />
tv.Name = "My TreeView";<br />
TreeNode tn1 = new TreeNode("1");<br />
TreeNode tn2 = new TreeNode("2");<br />
tv.Nodes.Add(tn1);<br />
tv.Nodes[0].Nodes.Add(tn2);<br />
<br />
MessageBox.Show(tv.Nodes[0].TreeView.Name + "; "<br />
     + tv.Nodes[0].Nodes[0].Parent.Text);<br />


The result will be "My TreeView; 1". Which means that tn1 knows that its parent TreeView is tv1, and tn2 knows that its parent TreeNode is tn1. This is weird, because nowhere did I tell tn1 about tv1, or tn2 about tn1, and the Parent and TreeView properties are read only.

Does anyone know how they did this? Or how I might go about mimicing them?
GeneralRe: Tree Data Structure Pin
Heath Stewart24-Apr-04 10:20
protectorHeath Stewart24-Apr-04 10:20 
GeneralDirectory Structure Pin
Heilmann24-Apr-04 4:26
sussHeilmann24-Apr-04 4:26 
GeneralRe: Directory Structure Pin
Hesham Amin24-Apr-04 4:41
Hesham Amin24-Apr-04 4:41 
GeneralServer Connections/From Add-in Pin
cnurse24-Apr-04 4:14
cnurse24-Apr-04 4:14 
GeneralWindows Form Designer Error Pin
josefg24-Apr-04 3:41
josefg24-Apr-04 3:41 
GeneralRe: Windows Form Designer Error Pin
josefg24-Apr-04 7:32
josefg24-Apr-04 7:32 
GeneralServiceProcessInstaller.UserName and password inaccessible Pin
jiagia23-Apr-04 22:41
jiagia23-Apr-04 22:41 
GeneralRe: ServiceProcessInstaller.UserName and password inaccessible Pin
Heath Stewart24-Apr-04 10:37
protectorHeath Stewart24-Apr-04 10:37 
Generalsending xml Pin
hmdhmd23-Apr-04 22:13
hmdhmd23-Apr-04 22:13 
GeneralRe: sending xml Pin
Nick Parker24-Apr-04 7:30
protectorNick Parker24-Apr-04 7:30 
GeneralResourceManager Question Pin
hammackj23-Apr-04 19:16
hammackj23-Apr-04 19:16 
GeneralRe: ResourceManager Question Pin
Heath Stewart24-Apr-04 10:34
protectorHeath Stewart24-Apr-04 10:34 
GeneralRe: ResourceManager Question Pin
hammackj24-Apr-04 11:02
hammackj24-Apr-04 11:02 
GeneralRe: ResourceManager Question Pin
Heath Stewart25-Apr-04 4:14
protectorHeath Stewart25-Apr-04 4:14 
Generalchat program Pin
azhar_engineers23-Apr-04 19:00
azhar_engineers23-Apr-04 19:00 
GeneralRe: chat program Pin
Tomas Petricek24-Apr-04 5:10
Tomas Petricek24-Apr-04 5:10 
GeneralRe: chat program Pin
Heath Stewart24-Apr-04 10:28
protectorHeath Stewart24-Apr-04 10:28 

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.