How can i set icons for TreeView without using a ImageList? I guess i can't? [C]
The Windows Forms TreeView control is a pretty thin wrapper over the Win32 TreeView control. That control uses the Win32 ImageList control, which is wrapped by the Windows Forms ImageList. There's no other way to set the icons.
If you really want to do that, you can always draw the control yourself
why's that? for TreeView i understand why but for ListView. How can i obtain a graphics handle for each item in Tree or List View?
So MS guys, why you decide that is no need to set items icon directly, without ImageList?
I guess the question is, why not just use an imagelist? You can create that on the fly or at design time, either way. Just create it in code, add one image and you are good to go.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.