AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Stringrid Zeilen hinzufügen und löschen

Offene Frage von "schuetzejanett"
Ein Thema von schuetzejanett · begonnen am 22. Jan 2007 · letzter Beitrag vom 23. Jan 2007
 
schuetzejanett

Registriert seit: 5. Apr 2006
Ort: Fraureuth
62 Beiträge
 
#3

Re: Stringrid Zeilen hinzufügen und löschen

  Alt 22. Jan 2007, 22:20
ja ich sehe sie ja auch erhalte nur erhalte nur manchmal eine exception beim hinzufügen oder löschen

hier mal der ausschnitt des codes wo ich die stringgrids initialisiere , erstelle

Delphi-Quellcode:
private
    astringgrid: array of TStringgrid;

...

setlength(astringgrid,playerList.Count);

for j := Low(TabTitles) to High(TabTitles) do
              begin
                atabsheet[j] := TTabSheet.Create(aPageControl[i]) ;
                with atabsheet[j] do
                  begin
                    PageControl := aPageControl[i];
                    Name := 'ts' + TabTitles[j];
                    Caption := TabTitles[j];
                    astringgrid[(i*2+j)] := TStringgrid.Create(atabsheet[j]);
                    with astringgrid[(i*2+j)] do
                      begin
                        parent := atabsheet[j];
                        top:=5;
                        width := 140;
                        defaultrowheight := 15;
                        scrollbars := ssvertical;
                        if j = 0 then
                          begin
                            rowcount := 2;
                            colcount := 4;
                            fixedrows := 1;
                            defaultcolwidth := 40;
                            colwidths[0] := 20 ;
                            cells[1,0]:= '1';
                            cells[2,0]:= '2';
                            cells[3,0]:= '3';
                          end
                        else
                          begin
                            colcount := 2;
                            fixedCols := 0;
                            defaultcolwidth := 60;
                            cells[0,0]:= 'Feld';
                            cells[1,0]:= 'Treffer';
                            afields := playerList.Player[i].fields;
                            rowcount := length(afields);
                            for k := 0 to high(afields) do
                              begin
                                cells[0,k+1] := inttostr(afields[k].field);
                                Cells[1,k+1] := inttostr(afields[k].anz);
                              end;//for
                          end;//else
                      end;//with stringgrid(2i+1)
                  end;//atabsheet[j]
               end;//for tabtitles
und jetzt wo ich eine zeile hinzufüge

Delphi-Quellcode:
 row := (astringgrid[currentplayerID *2].rowcount);
  astringgrid[currentplayerID *2].rowcount := (row +1);
  astringgrid[currentplayerID *2].Cells[0,row-1] := inttostr(row-1);
  astringgrid[currentplayerID *2].Cells[1,row-1] := points[0];
  astringgrid[currentplayerID *2].Cells[2,row-1] := points[1];
  astringgrid[currentplayerID *2].Cells[3,row-1] := points[2];
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:42 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