Ver Mensaje Individual
  #5  
Antiguo 22-05-2003
Ruben_Cu Ruben_Cu is offline
No confirmado
 
Registrado: oct 2003
Ubicación: Mariel, Cuba
Posts: 271
Reputación: 0
Ruben_Cu Va por buen camino
Hola mrmanuel, te decía que en la ayuda habían ejemplos aqui te envio una copiado de ella, los objetos están creados en tiempo de ejecución y los textos cargados a partir de un arreglo de cadenas, pienso que puedes adecuarlo a tu caso. En cualquier caso si sigues con problemas regresa por acá.
Código:
 procedure TForm1.FormCreate(Sender: TObject);

const
  Names: array[0..5, 0..1] of string = (
    ('Rubble', 'Barney'),
    ('Michael', 'Johnson'),
    ('Bunny', 'Bugs'),
    ('Silver', 'HiHo'),
    ('Simpson', 'Bart'),
    ('Squirrel', 'Rocky')
    );

var
  I: Integer;
  NewColumn: TListColumn;
  ListItem: TListItem;
  ListView: TListView;
begin
  ListView := TListView.Create(Self);
  with ListView do
  begin
    Parent := Self;
    Align := alClient;

    ViewStyle := vsReport;

    NewColumn := Columns.Add;
    NewColumn.Caption := 'Last';
    NewColumn := Columns.Add;
    NewColumn.Caption := 'First';

    for I := Low(Names) to High(Names) do
    begin
      ListItem := Items.Add;
      ListItem.Caption := Names[i][0];
      ListItem.SubItems.Add(Names[i][1]);
    end;
  end;

end;
Saludos
Responder Con Cita