Autor Beitrag
Torsten
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 160



BeitragVerfasst: So 12.01.03 16:25 
Hallo Leute,

anscheinend bin ich mal wieder zu doof oder sehe den Wald vor lauter Bäumen nicht mehr.

Ich möchte gerne in einem TStringGrid eine markierte Zeile auf Knopfdruck (o.ä.) kopieren und eine Zeile tiefer einfügen.
Irgendwie habe ich da leichte Probleme.

Hätte jemand eine Idee?

Fragende Grüße

Torsten
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 12.01.03 16:58 
Hallo

auf [url]http:\\www.swissdelphicenter.ch[/url] mal nachschauen, dort gibt es ein paar Tips fürs Stringgrid.
ansonsten muß du die Zeilenzahl um eines erhöhen und fängst von der letzen Zeile an, die Zeilen "runterzuziehen".
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
  with stringgrid1 do
     begin
        rowcount:=rowcount+1;
        for i:=rowcount-1 downto row+1 do rows[i]:=rows[i-1];
        rows[row+1]:=rows[row]
     end;


mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
Torsten Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 160



BeitragVerfasst: So 12.01.03 17:37 
Hallo Frank,

danke für die Antwort.
Ja, so ungefähr ist es schon ganz gut.

Unter www.swissdelphicenter.ch habe ich jedoch nichts gefunden. Hatte den Tag über schon dort gesucht.

Jedoch dürfte Dein Beispiel helfen.

Grüße

Torsten