Delphi-PRAXiS

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 Problem mit Stringgrid (https://www.delphipraxis.net/8061-problem-mit-stringgrid.html)

Hansa 27. Aug 2003 19:21


Problem mit Stringgrid
 
Ja, ein besserer Titel ist mir nicht eingefallen. Ich habe ein StringGrid. In das werden Werte einer verketteten Liste eingetragen. Das hat aber mit dem Problem nichts zu tun. Obwohl ich da Row und RowCount besetzt habe, wird auch Zeile 0 angezeigt. Wieso?

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  l_aufbau (Kopf,Liste);
  liste := Kopf;
  StringGrid1.RowCount := 4;
  StringGrid1.Row := 3;
  while Liste <> nil do begin
    StringGrid1.Cols [0].Add (Liste^.nr);
    StringGrid1.Cols [1].Add (Liste^.bez);
    StringGrid1.Cols [2].Add (FloatToStrF (Liste^.inhalt,ffGeneral,9,2));
    Liste := Liste^.naechst;
    StringGrid1.RowCount := StringGrid1.RowCount + 1;
  end;
end;
Ich will eine Titelzeile haben, sonst nichts. Und noch eine Frage am Rande: die Zahl bei FloatToStrF ist linksbündig, wie kriege ich das rechtsbündig hin ?

CalganX 27. Aug 2003 19:28

Re: Problem mit Stringgrid
 
Schau dir mal FixedRows und FixedCols an.
Wenn es das nicht ist, dann habe ich dich nicht verstanden...

Chris

PS: Reihe 0 wird immer angezeigt... ;)

Hansa 27. Aug 2003 19:41

Re: Problem mit Stringgrid
 
Fixed gibt doch nur an, welche Zeilen/Spalten anders angezeigt werden. FixedRows steht auf 1 FixedCols auf 0. Aber Row/RowCount ist doch auf 3/4 gesetzt. Was hat da was in Zeile 0/1 zu suchen?


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:47 Uhr.

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