Autor Beitrag
read
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57

Win XP prof.
Delphi7 + Delphi2 Developer
BeitragVerfasst: Sa 15.01.05 23:11 
Hallo zusammen!

sitze hier grad an 'nem problem, und hoffe einer von euch kann helfen

also ich will in einem editfeld nur zahlen zu lassen, dafür hab ich folgendes gemacht

ausblenden Delphi-Quelltext
1:
2:
3:
4:
 if not (key in['0'..'9',#8,#13]) then
  begin
  key := #0;
  end;


soweit sogut, aber nun kann ich nur einstellige zahlen in das editfeld eingeben - warum?
was hab ich falsch gemacht?

gruß

marco

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt.

_________________
Es gibt Tage da verliert man, und dann gibt es Tage da gewinnen die anderen
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Sa 15.01.05 23:18 
hallo marko!

in welchem event überprüfst du die eingabe?
read Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57

Win XP prof.
Delphi7 + Delphi2 Developer
BeitragVerfasst: Sa 15.01.05 23:23 
hallo grayfox

das ganze lass ich beim keypress auswerten

gruß

marco

_________________
Es gibt Tage da verliert man, und dann gibt es Tage da gewinnen die anderen
read Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 57

Win XP prof.
Delphi7 + Delphi2 Developer
BeitragVerfasst: Sa 15.01.05 23:39 
äh...hat sich grad erledigt, hab den fehler gefunden

hab nach der abfrage die returntaste abgefragt, welche das edit auch gleich wieder löschen soll ... hatte das edit.clear an der falschen stelle

gruß

marco

_________________
Es gibt Tage da verliert man, und dann gibt es Tage da gewinnen die anderen