Autor Beitrag
martin300
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 186
Erhaltene Danke: 2



BeitragVerfasst: So 14.12.08 10:48 
Hallo,
ich möchte in einem TEdit nur Ziffern und das Löschen zulassen. Dazu wird im Ereignis
KeyPress abgefragt ob es sich um ein Zeichen vk_back handelt. Wenn es sich um ein vk_back
handelt, soll die selbe Funktion aufgerufen werden um das Zeichen zu löschen.
Wie funktioniert das?
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: So 14.12.08 10:59 
Hi :)

Ich gehe mal davon aus, dass du alle Zeichen außerhalb ['0'..'9', Char(vk_Back)] mit #0 überschreibst? Dann überscheibe doch einfach diese Zeichen nicht und es dürfte der gewünschte Effekt eintreten ;)

Oder überschreibst du im Moment etwa alle, und fügst bei '0'..'9' das Zeichen manuell an?

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
martin300 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 186
Erhaltene Danke: 2



BeitragVerfasst: So 14.12.08 11:12 
Danke. Es funktioniert.