Ver Mensaje Individual
  #2  
Antiguo 03-07-2006
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Reputación: 22
Héctor Randolph Va por buen camino
Hola gilberto_1126

Prueba con la propiedad Selecctions que te devuelve un arreglo con los items seleccionados y SelectionCount te dice cuántos items hay seleccionados.


Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  I:Integer;
begin
  if ListBox1.Items.Capacity=0 then
  begin
    for I:=0 to TreeView1.SelectionCount-1 do
    ListBox1.Items.Add(TreeView1.Selections[i].Text);
  end;
end;

Saludos
Responder Con Cita