Ver Mensaje Individual
  #6  
Antiguo 15-01-2007
richi richi is offline
Miembro
 
Registrado: jun 2006
Ubicación: Portosin - A Coruña
Posts: 51
Reputación: 18
richi Va por buen camino
Lo que pudes hacer es poner en el OnKeyPress del edit lo siguiente:
Código Delphi [-]
if (key in['0'..'9',#8,',']) then
  begin
    if (key = ',') then
    begin
      try
        temp  := strToFloat(Edit1.text+key);
      except
        key:= #0;
      end;
    end;
  end
  else
    key:= #0;
Siendo temp una variable de tipo real o currecy segun lo que te haga falta.

Última edición por richi fecha: 15-01-2007 a las 13:42:28.
Responder Con Cita