Autor Beitrag
Archdevil
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Fr 16.02.07 19:13 
Hi,

hoffe das hier ist der richtige Bereich für die Frage. Wenn nicht, vorab schonmal sorry ;)

Zu mein Problem:

Ich hab in meinem Form ein Button der sowohl Text als auch Zahlen enthält. Die Zahl innerhalb des Buttons soll während des Programmes geändert werden.

Ich will das ganze nochmal an einem Beispiel erläutern. In dem Button steht vorab z.B: "Anzahl: 10". Die Zahl 10 sei dabei von einer Variable "Zahl" eingelesen. Nachdem man nun auf einen anderen Button klickt, ändert sich der Wert für die Variable von 10 auf 9 und somit soll dann auch aus dem "Anzahl: 10", "Anzahl: 9" werden. Bekomme allerdings die Übergabe von einem String und einer Variable mit Integerwert nicht hin.

Hab es hiermit versucht:

Button.Caption:=IntToStr('Call:',Zahl) da ich irgentwie in Erinnerung hab, dass es so bei TurboPascal ging ^^

Allerdings kommt dann die Fehlermeldung: "Zu viele Paramter"

Ich hoffe, ich hab es verständlich erklärt.
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Fr 16.02.07 19:15 
ausblenden Delphi-Quelltext
1:
Button.Caption:= 'Call:' + IntToStr(Zahl)					

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 16.02.07 19:16 
Moin und :welcome: im Forum!

Probier das mal so: ;)
ausblenden Delphi-Quelltext
1:
Button1.Caption := Format('Call:%d',[Zahl]);					

cu
Narses

PS: zu langsam... :|

_________________
There are 10 types of people - those who understand binary and those who don´t.
Archdevil Threadstarter
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Fr 16.02.07 19:19 
Ah, ging ja schnell. Danke :D
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Fr 16.02.07 19:20 
user profile iconNarses hat folgendes geschrieben:
...
PS: zu langsam... :|

Für was gibt es denn die neue Funktion

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 16.02.07 19:23 
Moin!

Um so schnell wie möglich zu antworten sicher nicht... :?!?:

cu
Narses

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