gpt4 book ai didi

delphi - 如何更改虚拟 TreeView 中根节点的状态索引?

转载 作者:行者123 更新时间:2023-12-03 18:28:14 25 4
gpt4 key购买 nike

我在虚拟 TreeView 的 Stateimages 中分配了一个 ImageList。
如何更改根节点的 stateindex?我什么也找不到。
谢谢您的帮助。

最佳答案

您需要执行 OnGetImageIndex事件。在那里你可以设置var ImageIndexImageList 中图像的索引.

如果只需要申请根节点,可以查看节点parent = nil .

从帮助:

10.1.2.104 TBaseVirtualTree.OnGetImageIndex Event

property OnGetImageIndex: TVTGetImageEvent; Description

This event is triggered whenever the tree needs the index of an image, be it the normal, the selected or the state image. The event should be as fast as possible because it is at times frequently called when the layout of the node must be determined, e.g. while doing draw selection with the mouse or painting the tree. Kind determines which image is needed and Column determines for which column of the node the image is needed. This value can be -1 to indicate there is no column used. The parameter Ghosted can be set to true to blend the image 50% against the tree background and can be used for instance in explorer trees to mark hidden file system objects. Additionally nodes are also drawn with a ghosted icon if the are part of a cut set during a pending cut-to-clipboard operation. In this case changing the ghosted parameter has no effect. Notes Blending nodes can be switched by using toUseBlendImages in TreeOptions.PaintOptions. Class

关于delphi - 如何更改虚拟 TreeView 中根节点的状态索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11480323/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com