Startseite ¦  was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews ¦  sonstiges
kylix ¦  tutorials ¦  online shop ¦  fotos ¦  Add&Win Gewinnspiel


Willkommen Gast. Bitte einloggen oder registrieren.
22.05.2012, 13:43:18
Übersicht Hilfe Suche Einloggen Registrieren

+  SwissDelphiCenter Forum
|-+  English Forums
| |-+  General Forum
| | |-+  ListView
« vorheriges nächstes »
Seiten: [1] Drucken
Autor Thema: ListView  (Gelesen 3833 mal)
ekerazha
Newbie
*
Offline Offline

Beiträge: 40


46867465
« am: 08.03.2002, 14:05:07 »

how can i write in the ListView's linescolumns (report style)?

thank you very much!
Gespeichert
Lemy
Hero Member
*****
Offline Offline

Beiträge: 605



« Antworten #1 am: 08.03.2002, 14:16:18 »

[font  size=2 face="Courier New" color="#000000"]Here is the example from the Delphi-Help:

procedure TForm1.FormCreate(Sender: TObject);
const
  
Names: array[0..5, 0..1] of ShortString = (
    ('Domino', 'Fats'),
    ('Wagner', 'Richy'),
    ('Mozart', 'Wolferl'),
    ('Bach', 'Jockel'),
    ('Beethoven', 'Lucky'),
    ('Strauß', 'Johnny')
    );

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 := 'Letzter';
    NewColumn := Columns.Add;
    NewColumn.Caption := 'Erster';

    for I := 0 to High(Names) do
    begin
      
ListItem := Items.Add;
      ListItem.Caption := Names[0];
      ListItem.SubItems.Add(Names[1]);
    end;
  end;
end;
[/font]
Gespeichert
ekerazha
Newbie
*
Offline Offline

Beiträge: 40


46867465
« Antworten #2 am: 08.03.2002, 17:03:39 »

yeah, but don't write by delphi... write manually when the program is executed (like in an edit for example...)
Gespeichert
Lemy
Hero Member
*****
Offline Offline

Beiträge: 605



« Antworten #3 am: 08.03.2002, 21:12:44 »

Set the readonly property to false, then you can change the Leftmost field.
Gespeichert
Seiten: [1] Drucken 
« vorheriges nächstes »
Gehe zu:  


Einloggen mit Benutzername, Passwort und Sitzungslänge

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Prüfe XHTML 1.0 Prüfe CSS