简体   繁体   中英

How to add images in front of treelist control of devexpress?

I have treelist that have four level child nodes.

rootNode->1ChildNode.

1ChildNode->2ChildNode.

2ChildNode->3ChildNode.

树形列表的屏幕截图 I would like to provide image to each node of treelist. I set rootNode.ImageIndex = 0 and clientNode1.ImageIndex = 1 but it didn't work. Also, How can I bold or assign large font to 1ChildNode? Can someone please let me know what I am missing? thank you!

Refer the documentation of TreeListNode.ImageIndex and TreeListNode.StateImageIndex Property

Select Image source:

The source of select images is specified by the TreeList.SelectImageList property. Certain select images are assigned to nodes by indexes (zero-based integer values referring to images in the SelectImageList ).

State Image source:

The source of state images is specified by the TreeList.StateImageList property. Use the StateImageIndex property to associate certain state images from this list with nodes.

You just need to set Selected or State image list property. after that these properties work property. Or you can set image at TreeList.GetSelectImage and TreeList.GetStateImage event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM