Fórum Ajuda na validacao #294167
01/09/2005
0
e no evento onkeypress eu tentei assim :
if not (key in [´0´..´9´]) then
key := #0;
porem ele nao deixa eu teclar nada ao nao ser numeros... so q se o cara digitar errado nem o backspace ele consegue digitar ... como eu arrumaria isso ?
Fernando_cunha
Curtir tópico
+ 0Posts
01/09/2005
Rjun
if (not (Key in [´0´..´9´]) and (Key <> 8)) then Key := 0;
Gostei + 0
01/09/2005
Fernando_cunha
Gostei + 0
01/09/2005
Fernando_cunha
Gostei + 0
01/09/2005
Rjun
Se você postasse o que não funcionou, ficaria mais fácil para ajudar.
Gostei + 0
01/09/2005
Fernando_cunha
mas eu descobri o erro...
vc me passou o seguinte codigo
if (not (Key in [´0´..´9´]) and (Key <> 8)) then Key := 0;
e eu burrão coloquei o seguinte
if not ((Key in [´0´..´9´]) and (Key <> 8)) then Key := 0;
ou seja errei nos parenteses...
mas obrigadao ai Rjun
Gostei + 0
02/09/2005
Josh_bsb
if not (key in [´0´..´9´, 8]) then key := 0;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)