Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Tlistbox und mehrere Ergebnisse nebeneinander? (https://www.delphipraxis.net/23825-tlistbox-und-mehrere-ergebnisse-nebeneinander.html)

Luckie 10. Jun 2004 12:34

Re: Tlistbox und mehrere Ergebnisse nebeneinander?
 
Kuck doch bitte mal in der Hilfe, wie man mit einem Listview umgeht. TListview -> Eigenschaften -> Items. Da ist sogar ein Beispiel bei.

Swift 10. Jun 2004 12:39

Re: Tlistbox und mehrere Ergebnisse nebeneinander?
 
es tut mir ja leid aber ich hab die englische version von delphi und bei mir ist kein beispiel dabei ich hab delphi 6.

und wenn ich

listview1.items.add(ergebnis1);

mache dann kommt nur too many actual parameters

Luckie 10. Jun 2004 12:41

Re: Tlistbox und mehrere Ergebnisse nebeneinander?
 
Tut mir leid. Ich habe auch die englische Version von Delphi 6 und da ist in der Hilfe ein Beispiel - sogar in der Personal Version.

Swift 10. Jun 2004 12:43

Re: Tlistbox und mehrere Ergebnisse nebeneinander?
 
entschuldigung aber kannst du mir nicht einfach ein beispiel schicken wie ich das schreiben muss das er a b und c anzeigt in einer list?


wäre sehr nett

Luckie 10. Jun 2004 12:48

Re: Tlistbox und mehrere Ergebnisse nebeneinander?
 
Zitat:

Zitat von OH
Contains the list of items displayed by the list view.

property Items: TListItems;

Description

Use Items to directly access the TListItem objects that represent the items in the list. Setting this property at design time brings up the ListView Items Editor. Use this dialog to add or delete items or subitems, and to edit their display properties. At runtime, use each item's Caption, ImageIndex and StateIndex properties to change the appearance of the list items.

Warning: Items is read-only if the application is running in virtual mode.

Zitat:

This example requires only a blank form. All other objects: TListView, TListColumns, TListItems, are created dynamically. file.You must add comctrls to the uses clause of the unit file.
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);

const
  Names: array[0..5, 0..1] ofstring = (
    ('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;

Swift 10. Jun 2004 12:51

Re: Tlistbox und mehrere Ergebnisse nebeneinander?
 
gut ok und wie muss ich des jetzt auf mein programm anwenden es tut mir leid aber ich blick des einfach net


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:59 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz