Ver Mensaje Individual
  #3  
Antiguo 02-07-2003
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Reputación: 10
marcoszorrilla Va por buen camino
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}

            end
            else
              Key := #0;
          end;
Un Saludo.
Responder Con Cita