Different size icons in treeview
-
Hi, I would like to display two different Icons next to my nodes in a treeview only problem is they are different sizes. I could set the Image list to the size of the largest one but i dont want big gaps around the smallest one. Can anyone help me out?
-
Hi, I would like to display two different Icons next to my nodes in a treeview only problem is they are different sizes. I could set the Image list to the size of the largest one but i dont want big gaps around the smallest one. Can anyone help me out?
-
sorry I must not have explained myself properly. As far as I can tell to use icons in treeview you create an image list. This image list is then used by treeview. My problem is that the image list only outputs images to treeview of one size. I can generate images of any size i like but they are scaled by the imagelist to say 32x32. in this case the image i have of 32x32 will be fine but the image i have of 16x16 will be stretched to 32x32. I dont want to stretch my image to 32x32. I could use an image editor to make it 32x32 and keep the actual image the same size but it leaves big gaps in my treeviw and looks really bad. any ideas?
-
sorry I must not have explained myself properly. As far as I can tell to use icons in treeview you create an image list. This image list is then used by treeview. My problem is that the image list only outputs images to treeview of one size. I can generate images of any size i like but they are scaled by the imagelist to say 32x32. in this case the image i have of 32x32 will be fine but the image i have of 16x16 will be stretched to 32x32. I dont want to stretch my image to 32x32. I could use an image editor to make it 32x32 and keep the actual image the same size but it leaves big gaps in my treeviw and looks really bad. any ideas?
you can tell the imagelist what size to make your images: ImageList.ImageSize[^]. The docs say the default is 16x16 so if they're being scaled to 32x32 then maybe something is changing the default value and you need to reset it to the size you want.