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 StringGrid1Click & aktuelle zeile (https://www.delphipraxis.net/10864-stringgrid1click-aktuelle-zeile.html)

horst 26. Okt 2003 23:34


StringGrid1Click & aktuelle zeile
 
versuche die aktuelle zeile eines stringgrids in ein edit zu bekommen
Delphi-Quellcode:
procedure TForm1.StringGrid1Click(Sender: TObject);
var c, min, i, j: Integer;
  s: string;
begin
  for i := 0 to stringgrid1.Rowcount - 1 do begin
  for j := 0 to stringgrid1.Colcount - 1 do begin
   s := StringGrid1.Cells.[i, j];
      edit2.text := s;
    end;
  end;
end;
da stimmt aber was nicht...

horst 26. Okt 2003 23:38

Re: StringGrid1Click & aktuelle zeile
 
hat sich erledigt ;)

flomei 26. Okt 2003 23:39

Re: StringGrid1Click & aktuelle zeile
 
Nennst du uns bitte die Lösung?

Danke!

MfG Florian :hi:

horst 26. Okt 2003 23:42

Re: StringGrid1Click & aktuelle zeile
 
sehr gerne doch...
Delphi-Quellcode:
procedure TForm1.StringGrid1Click(Sender: TObject);
var
  s:string;
begin
  s := StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row];
  if Length(s) > 1 then
  begin
   Edit2.Text := s;
  end;
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:51 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