Autor Beitrag
the.fellowship
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Do 02.03.06 16:40 
Hallo!
Was muss ich tun, damit sich die Caption verändert (wenn das Programm gestartet ist) ?
Ich habe an einen Befehl gedacht: Label1.Caption := Label1.CAption + ??? (und davor natürlich ein Key-Down ereignis einstellen...) DAnke für eine Antwort!!
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 02.03.06 16:42 
Und dann ein Form.Update; das die Änderungen sichtbar werden.

_________________
Markus Kinzler.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Do 02.03.06 16:47 
Application.ProcessMessages sollte normalerweise ausreichen.

AXMD
the.fellowship Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Do 02.03.06 16:48 
wie meinst du das? Ich dachte mir dass bei drücken von Taste A Im label dann Taste A steht; wie das funktiniert weiß ich, aber es wäre sinlos für jede Taste auf der Tastatur eine Bedingung zu schreiben. DAs muss doch anderst auc gehen, oder?
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 02.03.06 16:51 
ausblenden Delphi-Quelltext
1:
Label1.Caption := Label1.Caption + chr( Key);					


Edit: Tags korrigiert

_________________
Markus Kinzler.


Zuletzt bearbeitet von mkinzler am Do 02.03.06 16:52, insgesamt 1-mal bearbeitet
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Do 02.03.06 16:51 
Achso... das hättest du nicht schon oben schreiben können :roll: ? Wo ist das eigentliche Problem? Wenn du weißt, welche Tast gedrückt wurde, kannst du ja einfach die gedrückte in Form des entsprechenden ASCII-Werts übernehmen...

AXMD
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Do 02.03.06 16:57 
Ich denke das Problem ist, dass ein Label kein onKeyDown- bzw. onKeyPress-Ereignis hat.

Leider weiß ich auch nicht wie man das nachrüstet...
azrael_7
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 78

Windows Vista
D2005 Pers. [de]
BeitragVerfasst: Do 02.03.06 17:00 
nimm das onKeyDown-Ereignis vom Form...

_________________
-·- Es gibt Leute die bringen Freude, wohin sie gehen -·-
-·- und es gibt Leute, die bringen Freude, wenn sie gehen -·-
damadmax
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 60



BeitragVerfasst: Fr 03.03.06 12:48 
Wenn ich nicht gefragt werden kann, dann kann ich auch nicht antworten....

Ohne Fokus kein OnKey-Ereignis

_________________
Alle Rechtschreibfehler sind gewollt und sollen meine Individualität verstärkt zum Ausdruck bringen.
Alpha_Wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 297

Ubuntu, Win XP, Win Vista
C#, Delphi 6 Prof, Delphi 2007 Prof, Java
BeitragVerfasst: Fr 03.03.06 12:53 
Nimm doch einfach ne Edit setzt den Hintergrund der Form gleich, blende den Rand aus und schon siehts so aus wie n Label.. Jetzt hast du alles was du brauchst..^^

_________________
Diskutiere nie mit einem Irren - er zieht dich auf sein Niveau und schlägt dich mit seiner Erfahrung.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 03.03.06 13:26 
Warum willst du denn überhaupt ein Label zur Eingabe verwenden? Dafür gibt es nun wirklich besser Komponenten.