Autor Beitrag
greendesire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Mo 23.03.09 18:46 
Ich habe ein Stringgrid vorliegen und möchte nun, wenn jemand eine Zahl eingibt, diesen Wert einlesen.
Wie kann ich dies tun?
ich weiß, dass ich das Ereignis OnSetEditText benutzen muss, aber wie wandle ich den eingegebenen text jetzt in eine variable um?

edit: ich weiß also nicht welche Zelle angeklickt wurde.


Moderiert von user profile iconNarses: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Mo 23.03.2009 um 18:55
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 23.03.09 18:54 
Moin!

user profile icongreendesire hat folgendes geschrieben Zum zitierten Posting springen:
ich weiß also nicht welche Zelle angeklickt wurde.
Schau dir mal genau die Parameter der Methode an. :idea: ;)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.StringGrid1SetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);
  var
    Zahl: Integer;
begin
  Zahl := StrToIntDef(Value,-1);
  if (Zahl <> -1) then
    ShowMessageFmt('Es wurde die Zahl %d eingegeben!',[Zahl])
  else
    ShowMessage('Eingabe ist keine Zahl!');
end;
cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
greendesire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Mo 23.03.09 18:58 
mh stimmt lesen könnte helfen
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 23.03.09 19:00 
Moin!

Markierst du den Thread noch entsprechend, wenn dein Problem gelöst ist? Danke. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.