Autor Beitrag
Xerox
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 45

WinXP Pro, WinMe
D7 Pers
BeitragVerfasst: So 06.03.05 12:12 
hi leute!

ich weiss, dass man mit "ord(key)" erfahren kann, welche Taste gerade gedrückt wurde. Aber das Zeichen oder der Buchstabe bzw die Zahl wird automatisch ins Editfenster eingetragen.

Ich will aber, dass nur falls die Taste "4" gedrückt wird, diese in mein Edit eingetragen wird, alle anderen Tasten sollen sozusagen ignoriert werden. Weiss jemand wie das geht?

MFG
Xerox

PS.: Sorry, wenn ich mich villeicht etwas umständlich ausgedrückt habe.
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: So 06.03.05 12:21 
Überprüf doch im OnChange Ereigniss die Letzte Ziffer und wenns keine 4 is schmeiß sie raus. :gruebel:
OneOfTen
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 06.03.05 12:27 
Im OnKeyPress:

ausblenden Delphi-Quelltext
1:
2:
If (Key <> '4') 
Then Key := #0;
Xerox Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 45

WinXP Pro, WinMe
D7 Pers
BeitragVerfasst: So 06.03.05 13:16 
naja, manchmal hängts eben auch an kleinen sachen... :oops:
Danke für die Hilfe!
:wink: