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



BeitragVerfasst: Di 14.12.10 18:07 
Hi Leute,
ich baue grade einen Taschenrechner und wenn ich z.B. die 1 drücke und dann die 2 steht da 2 und nicht 12, wisst ihr wie ich das beheben kann??
danke


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

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 14.12.10 18:08 
Moin und :welcome: im Forum!

Ich rate mal, suchst du sowas? ;)
ausblenden Delphi-Quelltext
1:
Edit.Text := Edit1.Text +'2';					

cu
Narses

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

Für diesen Beitrag haben gedankt: forcedbydelphi
forcedbydelphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Di 14.12.10 18:12 
vielen dank
also dann bei 3
ausblenden Delphi-Quelltext
1:
Edit.Text := Edit1.Text +'3';					
und bei 4
ausblenden Delphi-Quelltext
1:
Edit.Text := Edit1.Text +'4';					
??

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 14.12.10 18:13 
Moin!

Probier´s doch mal aus, kein Mut zum Risiko? :zwinker: ja, so sollte es klappen

cu
Narses

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

Für diesen Beitrag haben gedankt: forcedbydelphi
forcedbydelphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Di 14.12.10 18:21 
jup es klappt, danke^^
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 14.12.10 18:27 
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.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 14.12.10 18:32 
Und wenn die Tasten mit 0 bis 9 beschriftet sind, kannst du auch allen die selbe Ereignisbehandlungsmethode zuweisen und dort schreiben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TMyForm.MyButtonClick(Sender: TObject);
begin
  MyEdit.Text := MyEdit.Text + (Sender as TButton).Caption;
end;
Denn Delphi teilt dir mit, von welcher Komponente der Klick kam. Dann musst du das nicht für jede Taste einzeln schreiben. ;-)