Viper
Member
Hi
I have a weird problem.
On the main screen of my application, I have a treeview that, depending on the type of item, one of three images are displayed. Images are 24x24.
When the form is constructed, the image list is initialized:
To create an item, I use code like this:
Ok, now for the weird problem. Sometimes the images display and sometimes there is just a whitespace of 24x24 where the image is supposed to be.
This happens when running from the IDE and running the compiled exe.
I have another control on the same form that initializes a 16x16 image list the same way and that one always works. The other control however, is not a treeview.
Any ideas?
I have a weird problem.
On the main screen of my application, I have a treeview that, depending on the type of item, one of three images are displayed. Images are 24x24.
When the form is constructed, the image list is initialized:
VB.NET:
imlData.Images.Add("Package", My.Resources.ico_Package24.ToBitmap)
imlData.Images.Add("Task", My.Resources.ico_Task24.ToBitmap)
imlData.Images.Add("Profile", My.Resources.ico_Profile24.ToBitmap)
tvwData.ImageList = imlData
To create an item, I use code like this:
VB.NET:
Dim node as New TreeNode("Test")
node.ImageKey = "Package"
tvwData.Nodes.Add(node)
Ok, now for the weird problem. Sometimes the images display and sometimes there is just a whitespace of 24x24 where the image is supposed to be.
This happens when running from the IDE and running the compiled exe.
I have another control on the same form that initializes a 16x16 image list the same way and that one always works. The other control however, is not a treeview.
Any ideas?
Last edited by a moderator: