Hola, necesito conocer el index de un nodo:
+Nodo1
--- Hijo
--- Hijo2
+Nodo2
<--- Necesito conocer este identificador
--- Hijo
--- Hijo2
Lo que yo hago es lo siguiente, en el evento OnChange del TTreeView:
Código Delphi
[-]
if node.Level = 1 then
begin
if node.Index = 0 then
begin
if node.GetPrev.Index = 1 then TthreadAlbumList.Create(Node.text);
if node.GetPrev.Index = 2 then TthreadArtistList.Create(Node.text);
if node.GetPrev.Index = 3 then TthreadStyleList.Create(Node.text);
if node.GetPrev.Index = 4 then TthreadFolderList.Create(Node.text);
end else
begin
end;
end;
Saludos y gracias.