![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#2
|
||||
|
||||
|
Un TEdit lmitado para entrar números
Pon este código en el evento OnKeyPress de tu TEdit y sólo admitirá números: Código:
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if ( StrScan('0123456789.-',Key) <> nil ) or
( Key = Char(VK_BACK) ) then { BackSpace Key }
begin
{Aqui tu tratamiento normal del evento}
{Here the normal event treatment}
end
else
Key := #0;
end;
__________________
Guía de Estilo de los Foros Cita:
|
|
|
|