Hallo,
hier mal meine Lösung (ich verwende einfach den ImageIndex statt Data):
Delphi-Quellcode:
procedure TForm1.TreeView1Compare(Sender: TObject; Node1, Node2: TTreeNode;
Data: Integer; var Compare: Integer);
begin
Compare := Integer(Node1.ImageIndex) - Integer(Node2.ImageIndex);
if Compare = 0 then
Compare := AnsiCompareStr(Node1.Text, Node2.Text);
end;
Gruß
xaromz