Ver Mensaje Individual
  #2  
Antiguo 16-12-2007
fidel fidel is offline
Miembro
 
Registrado: mar 2005
Posts: 381
Reputación: 20
fidel Va por buen camino
Pon en el evento OnKeyPress del edit

Código Delphi [-]
//controlar entrada solo números
  if ( StrScan('0123456789.'+chr(7)+chr(8), Key) = nil ) then  Key := #0;
  //cambiar punto decimal por coma
  if key = '.' then key := ',';
  //controlar entrada una sola coma
  for i := 1 to length(EDos.Text) do
    if ( copy(EDos.Text,i,1) = ',' ) and not ( StrScan(',', Key) = nil ) then  Key := #0;
Responder Con Cita