TdxTreeViewGetImageIndexEvent Type
In This Article
The image index retrieval procedural type for tree nodes.
#Declaration
Delphi
TdxTreeViewGetImageIndexEvent = procedure(Sender: TdxCustomTreeView; ANode: TdxTreeViewNode; var AImageIndex: Integer) of object;
#Parameters
Name | Type | Description |
---|---|---|
Sender | Tdx |
The Tree View control that raised an image index retrieval event. |
ANode | Tdx |
The target tree node. |
AImage |
Integer | An index of the image displayed in the target tree node. |
#Remarks
The following OnGetImageIndex event handler assigns images with the indexes 1 and 2 to expanded and collapsed nodes, respectively.
procedure TForm1.dxTreeViewControl1GetImageIndex(Sender: TdxCustomTreeView;
ANode: TdxTreeViewNode; var AImageIndex: Integer);
begin
if ANode.HasChildren then
if ANode.Expanded then
ANode.ImageIndex := 1
else
ANode.ImageIndex := 2;
end;
Note
A tree node’s Expanded
The Tree View’s OnGetImageIndex and OnGetSelectedImageIndex events reference the TdxTreeViewGetImageIndexEvent type.
See Also