Click here to Skip to main content
16,004,686 members
Home / Discussions / C#
   

C#

 
GeneralRe: Please I need your help...How to Work with Graphics in C# Pin
Programmer.Nick20-Sep-08 1:44
Programmer.Nick20-Sep-08 1:44 
GeneralRe: Please I need your help...How to Work with Graphics in C# Pin
Harvey Saayman20-Sep-08 1:46
Harvey Saayman20-Sep-08 1:46 
QuestionHow to use asmx file Pin
potter_Anil19-Sep-08 19:46
potter_Anil19-Sep-08 19:46 
AnswerRe: How to use asmx file Pin
DaveyM6919-Sep-08 22:22
professionalDaveyM6919-Sep-08 22:22 
QuestionBackgroundworker with EventWaitHandle no respond???? Pin
mimimimilaw19-Sep-08 16:15
mimimimilaw19-Sep-08 16:15 
AnswerRe: Backgroundworker with EventWaitHandle no respond???? Pin
Nicholas Butler20-Sep-08 0:09
sitebuilderNicholas Butler20-Sep-08 0:09 
QuestionTreeView; adding children to parentNodes assistance needed. Pin
HellTriX19-Sep-08 15:22
HellTriX19-Sep-08 15:22 
AnswerRe: TreeView; adding children to parentNodes assistance needed. Pin
DaveyM6919-Sep-08 22:16
professionalDaveyM6919-Sep-08 22:16 
1a. You can keep a reference to the node(s) that you want to add to or
1b. Use the overload Nodes.Add(string key, string text) when adding a node. You can then use the Nodes.Find method to search your nodes based on the key. This returns a Treenode array as each key doesn't have to be unique - I'd recommend making sure each key is unique though then there will only ever be one element in the array.

2. The tag can be used for anything you like.
A common way is:
Imagine a tree of Employee names - the tag could contain an employee object with all their data but the node's text would probably only show their name (by using the ToString method on the employee object maybe?). This way, if you wanted to show all the employee's data, you'd have it handy without having to look it up again based on their name.
This can obviously become memory intensive so in the case where a lot of nodes are expected it might be better to use the tag to store the employee ID only, then when you need their data you can look up based on a field that is unique to them.
BTW, you don't have to use the tag prperty on any node if you don't wish to.

3. Just use a TreeNode object (see 1a)

4. There's plenty around that won't seem so convoluted once you've got the hang of them.

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Expect everything to be hard and then enjoy the things that come easy. (code-frog)

QuestionHow can we override OnFormClosing method ? Pin
Mohammad Dayyan19-Sep-08 13:09
Mohammad Dayyan19-Sep-08 13:09 
AnswerRe: How can we override OnFormClosing method ? Pin
Mbah Dhaim19-Sep-08 13:44
Mbah Dhaim19-Sep-08 13:44 
GeneralRe: How can we override OnFormClosing method ? Pin
Mohammad Dayyan19-Sep-08 13:52
Mohammad Dayyan19-Sep-08 13:52 
Questionhow can i search in text files by c# Pin
ahmedhassan9619-Sep-08 12:37
ahmedhassan9619-Sep-08 12:37 
AnswerRe: how can i search in text files by c# Pin
Harvey Saayman20-Sep-08 0:57
Harvey Saayman20-Sep-08 0:57 
QuestionConvert swf to exe Pin
Waheed Ur Rehman19-Sep-08 5:50
Waheed Ur Rehman19-Sep-08 5:50 
AnswerRe: Convert swf to exe Pin
Anthony Mushrow19-Sep-08 9:08
professionalAnthony Mushrow19-Sep-08 9:08 
GeneralRe: Convert swf to exe Pin
Waheed Ur Rehman20-Sep-08 2:49
Waheed Ur Rehman20-Sep-08 2:49 
QuestionNamespaces with Web References Pin
Phillip Donegan19-Sep-08 5:39
Phillip Donegan19-Sep-08 5:39 
AnswerRe: Namespaces with Web References Pin
Phillip Donegan21-Sep-08 23:21
Phillip Donegan21-Sep-08 23:21 
Questionmouse hover image Pin
harcaype19-Sep-08 5:19
harcaype19-Sep-08 5:19 
AnswerRe: mouse hover image Pin
John_Adams19-Sep-08 5:46
John_Adams19-Sep-08 5:46 
AnswerRe: mouse hover image Pin
harcaype19-Sep-08 6:43
harcaype19-Sep-08 6:43 
QuestionMonitor internet usage Pin
electriac19-Sep-08 4:57
electriac19-Sep-08 4:57 
AnswerRe: Monitor internet usage Pin
jzonthemtn19-Sep-08 5:00
jzonthemtn19-Sep-08 5:00 
GeneralRe: Monitor internet usage Pin
electriac19-Sep-08 7:57
electriac19-Sep-08 7:57 
GeneralRe: Monitor internet usage Pin
electriac19-Sep-08 9:55
electriac19-Sep-08 9:55 

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.