Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
AnswerRe: datatable name is not set Pin
itiwant3-Dec-10 7:10
itiwant3-Dec-10 7:10 
Questionhow to switch between languages in windows? Pin
Shaahinm17-Nov-07 21:46
Shaahinm17-Nov-07 21:46 
Question(WPF)Porting Pan functionality from WinForms [modified] Pin
wolfshad317-Nov-07 19:46
wolfshad317-Nov-07 19:46 
QuestionSource code protection Pin
triag17-Nov-07 18:32
triag17-Nov-07 18:32 
AnswerRe: Source code protection Pin
Michael Sync17-Nov-07 18:51
Michael Sync17-Nov-07 18:51 
GeneralRe: Source code protection Pin
triag17-Nov-07 20:03
triag17-Nov-07 20:03 
GeneralRe: Source code protection Pin
Michael Sync17-Nov-07 21:03
Michael Sync17-Nov-07 21:03 
GeneralRe: Source code protection Pin
triag17-Nov-07 21:23
triag17-Nov-07 21:23 
GeneralRe: Source code protection Pin
pmarfleet17-Nov-07 22:45
pmarfleet17-Nov-07 22:45 
AnswerRe: Source code protection Pin
Michael Davey 117-Nov-07 19:05
Michael Davey 117-Nov-07 19:05 
Questiondata grid view in c# Pin
w20917-Nov-07 17:27
w20917-Nov-07 17:27 
AnswerRe: data grid view in c# Pin
Michael Sync17-Nov-07 18:49
Michael Sync17-Nov-07 18:49 
QuestionLanguage of Resource DLL (.net) Pin
M i s t e r L i s t e r17-Nov-07 13:42
M i s t e r L i s t e r17-Nov-07 13:42 
AnswerRe: Language of Resource DLL (.net) Pin
wizfrog17-Nov-07 14:10
wizfrog17-Nov-07 14:10 
GeneralRe: Language of Resource DLL (.net) Pin
M i s t e r L i s t e r18-Nov-07 6:57
M i s t e r L i s t e r18-Nov-07 6:57 
QuestionUsing an XML DB in Visual C# Pin
wizfrog17-Nov-07 13:38
wizfrog17-Nov-07 13:38 
AnswerRe: Using an XML DB in Visual C# Pin
Not Active17-Nov-07 14:11
mentorNot Active17-Nov-07 14:11 
GeneralRe: Using an XML DB in Visual C# Pin
wizfrog17-Nov-07 14:35
wizfrog17-Nov-07 14:35 
GeneralRe: Using an XML DB in Visual C# Pin
Not Active17-Nov-07 16:37
mentorNot Active17-Nov-07 16:37 
QuestionNode List Problem Pin
merrsh197817-Nov-07 11:23
merrsh197817-Nov-07 11:23 
AnswerRe: Node List Problem Pin
wizfrog17-Nov-07 14:42
wizfrog17-Nov-07 14:42 
GeneralRe: Node List Problem Pin
merrsh197817-Nov-07 20:03
merrsh197817-Nov-07 20:03 
GeneralRe: Node List Problem Pin
merrsh197818-Nov-07 9:36
merrsh197818-Nov-07 9:36 
AnswerRe: Node List Problem Pin
Ravi Bhavnani17-Nov-07 16:47
professionalRavi Bhavnani17-Nov-07 16:47 
QuestionTreeView Images (Image Array) Pin
Jeffrey Walton17-Nov-07 10:17
Jeffrey Walton17-Nov-07 10:17 
Hi All,

I have a TreeView for which I have created images. Rather than using a single image per item, I've created an array. So rather than than a 16x16 BMP, I am using an array of 16x16 BMP's. The array includes standard and selected images. They are laid out as [standard, selected] pairs.

I add the image to the the tree view. However, when dispalyed, there are no images. I beieve this is because the control is not performing the derefernce into the array. How do I get the TreeView to properly use the array of images? TreeView uses and ImageList, and the array is a list (I think...).

Jeff

public static ImageList images = new ImageList();
...
images.Images.Add(new Bitmap("TreeViewImages.bmp"));  // 0 - 59
TreeView.ImageList = images;
...
TreeNode node = new TreeNode();
...
int ImageIndex = GetImageIndex(GetTagNumber());
node.ImageIndex = ImageIndex;
node.SelectedImageIndex = ImageIndex + 1;

private static int GetImageIndex(int number)
{
  return ...;
}

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.