开发者

Treeview OnClick chages images

开发者 https://www.devze.com 2022-12-23 06:10 出处:网络
I have a treeview (winforms) which have different item types on it. I have three item types on it, and when a user cl开发者_运维百科icks on it, it changes the icon of that clicked item to the first Im

I have a treeview (winforms) which have different item types on it. I have three item types on it, and when a user cl开发者_运维百科icks on it, it changes the icon of that clicked item to the first ImageList image.

I don't that to happen (altought i know it's desired behavior for default treeview).

Any chance I can do this? How?

Thanks


Set the SelectedImageIndex (SelectedImageKey) to the same value of ImageIndex(ImageKey) properties of each TreeNode.

Note: use SelectedImageIndex with ImageIndex OR SelectedImageKey with ImageKey.


You want the SelectedImageIndex of the node to be set to default or something other than what it's on now. You can change that through edit nodes or on the Tree View control.

0

精彩评论

暂无评论...
验证码 换一张
取 消