![]() |
stringgrid columns
hiho
:wink: ich wollte ma fragn wie man im stringgrid die columns benennen kann ich hab scho gesucht aba kein anderen thread gefunden mfg |
Re: stringgrid columns
Weiß meinst Du mit benennen? Erstelle mal ein leeres Projekt, wirf ein StringGrid rein und diesen Code ins OnCreate Ereignis Deines Forms. Das sollte helfen ;)
Delphi-Quellcode:
...:cat:...
procedure TForm1.FormCreate(Sender: TObject);
var _Col, _Row: Integer; begin with StringGrid1 do begin RowCount := 9; ColCount := 9; FixedCols := 2; FixedRows := 1; for _Col := 0 to Pred(ColCount) do for _Row := 0 to Pred(RowCount) do Cells[_Col, _Row] := Format('[%d, %d]', [_Col, _Row]); end; end; |
Re: stringgrid columns
hmmm... sieht schoma net schlecht aus :thuimb:
mit benennen meine ich die überschrift (bei DBGrid heisst das columns) der einzelnen spalten also sozusagen nach deiner source die grau hinterlegten felder [0,0] , [1,0] , [2,0] ,[3,0] .... |
Re: stringgrid columns
Zitat:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin with StringGrid1 do begin Cells[1,0] := 'Spalte 1'; Cells[2,0] := 'Spalte 2'; Cells[3,0] := 'Spalte 3'; end; end; |
Re: stringgrid columns
jo thx :hello: :hello:
hat geklappt |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:19 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