Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
GeneralRe: How To Add Buttons In Textbox? Pin
Ravi Bhavnani21-Aug-13 11:37
professionalRavi Bhavnani21-Aug-13 11:37 
GeneralRe: How To Add Buttons In Textbox? Pin
Mycroft Holmes21-Aug-13 12:53
professionalMycroft Holmes21-Aug-13 12:53 
QuestionTreeview node folder images Pin
rfresh20-Aug-13 13:28
rfresh20-Aug-13 13:28 
AnswerRe: Treeview node folder images Pin
BillWoodruff20-Aug-13 14:57
professionalBillWoodruff20-Aug-13 14:57 
GeneralRe: Treeview node folder images Pin
rfresh20-Aug-13 15:03
rfresh20-Aug-13 15:03 
GeneralRe: Treeview node folder images Pin
BillWoodruff20-Aug-13 15:13
professionalBillWoodruff20-Aug-13 15:13 
GeneralRe: Treeview node folder images Pin
rfresh20-Aug-13 18:09
rfresh20-Aug-13 18:09 
GeneralRe: Treeview node folder images Pin
BillWoodruff21-Aug-13 2:01
professionalBillWoodruff21-Aug-13 2:01 
Re: can't delete message: I guess that once responses have been made to a post it can't be deleted on this type of forum. That's something I've never thought about before, and I apologize if I misled you.

Looking at your code, I can't quite follow what you're doing: your pushing Directories on a Stack, in the first loop, but in your second loop, traversing the files, I can't see where the Stack is being used. Neither loop shows where 'currentNode is being set. And, 'childDirectoryNode is, of course, contained in the scope of the loop that traverses the Directories.

My guess is: the two loops you show are separate pieces of code, and that they are connected in some way not shown, perhaps in a recursive outer method ?

Are you using WinForms, and the MS standard TreeView ?

Do keep in mind that for the WinForms TreeView you can set the default Node image at design-time by either the 'ImageIndex or 'ImageKey property of the TreeView (assuming you've set the 'ImageList property of the TreeView to a valid ImageList). Those two properties are "mutually exclusive:" you set one, and it "disables" the other.

I'd suggest you start by finding an example that uses just recursion, and doesn't use a Stack (although using a Stack to reduce the "overhead" of recursion is a very good thing).

good luck, Bill

~
“This isn't right; this isn't even wrong." Wolfgang Pauli, commenting on a physics paper submitted for a journal

AnswerRe: Treeview node folder images Pin
Ravi Bhavnani21-Aug-13 7:40
professionalRavi Bhavnani21-Aug-13 7:40 
AnswerRe: Treeview node folder images Pin
SaqibRasheed23-Aug-13 2:19
SaqibRasheed23-Aug-13 2:19 
QuestionChart ToolTip using #VALX as Key of a dictionary Pin
PozzaVecia20-Aug-13 11:43
PozzaVecia20-Aug-13 11:43 
QuestionASP.NET - Dynamic Control ? Or Some other idea ? Pin
Forbiddenx20-Aug-13 9:42
Forbiddenx20-Aug-13 9:42 
SuggestionRe: ASP.NET - Dynamic Control ? Or Some other idea ? Pin
Richard MacCutchan20-Aug-13 20:12
mveRichard MacCutchan20-Aug-13 20:12 
QuestionRetrieve all rows in MySQL stored procedure and put in in C# class. Pin
dudz artiaga20-Aug-13 3:24
dudz artiaga20-Aug-13 3:24 
AnswerRe: Retrieve all rows in MySQL stored procedure and put in in C# class. Pin
Simon_Whale20-Aug-13 4:55
Simon_Whale20-Aug-13 4:55 
AnswerRe: Retrieve all rows in MySQL stored procedure and put in in C# class. Pin
SaqibRasheed20-Aug-13 12:24
SaqibRasheed20-Aug-13 12:24 
QuestionGetting 403 (Forbidden) from HttpWebRequest Pin
Member 993503820-Aug-13 1:32
Member 993503820-Aug-13 1:32 
AnswerRe: Getting 403 (Forbidden) from HttpWebRequest Pin
Keith Barrow20-Aug-13 2:35
professionalKeith Barrow20-Aug-13 2:35 
GeneralRe: Getting 403 (Forbidden) from HttpWebRequest Pin
Member 993503820-Aug-13 3:28
Member 993503820-Aug-13 3:28 
GeneralRe: Getting 403 (Forbidden) from HttpWebRequest Pin
Keith Barrow20-Aug-13 3:56
professionalKeith Barrow20-Aug-13 3:56 
GeneralRe: Getting 403 (Forbidden) from HttpWebRequest Pin
harold aptroot20-Aug-13 4:10
harold aptroot20-Aug-13 4:10 
Questionthreading in c# Pin
Member 1022020019-Aug-13 23:31
Member 1022020019-Aug-13 23:31 
AnswerRe: threading in c# Pin
Pete O'Hanlon20-Aug-13 0:01
mvePete O'Hanlon20-Aug-13 0:01 
SuggestionRe: threading in c# Pin
Ahsan9820-Aug-13 0:20
Ahsan9820-Aug-13 0:20 
SuggestionRe: threading in c# Pin
Ahsan9820-Aug-13 0:31
Ahsan9820-Aug-13 0:31 

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.