Ver Mensaje Individual
  #4  
Antiguo 20-09-2008
harpo harpo is offline
Miembro
 
Registrado: jul 2006
Posts: 35
Reputación: 0
harpo Va por buen camino
Tienes toda la razón.

Queda así:

Código:
procedure TfrArbolSelec.AnadirNodo (Nodo:TTreeNode;Padre:TTreeNode;Path:String);
var
  i        :integer;
  NodoPadre:TTreeNode;
begin
    Nodo.Expand(false);

    if Nodo.HasChildren then // si es un directorio
    begin
      NodoPadre := TVSeleccionados.Items.AddChild(Padre,Nodo.Text);
      for i:= 0 to Nodo.Count-1 do
        AnadirNodo(Nodo.Item[i],NodoPadre,Path + '\' + Nodo.Text);
    end
    else
    begin
      TVSeleccionados.Items.AddChild(Padre,Nodo.Text);
    end;

    Nodo.Collapse(false);
end;
Muchas Gracias
Responder Con Cita