Ver Mensaje Individual
  #6  
Antiguo 11-02-2019
tarco35 tarco35 is offline
Miembro
 
Registrado: sep 2003
Posts: 210
Reputación: 21
tarco35 Va por buen camino
Muestro como lo he resuelto:
Código Delphi [-]
procedure TFormNuevaVisita.Edit2KeyPress(Sender: TObject; var Key: Char);
var
  cd:string;
begin
  If Key='.' then Key:=',';
  cd :=(Sender as TEdit).Text;  // variable intermedia para clarificar codigo
  If ((Pos(',',Cd))<>0) AND (Key=',') Then Key:=#0;  // solo se permite un signo de puntuacion
  (Sender as TEdit).ReadOnly := not (key in [#8,#46, ',','0'..'9']);  // sentencia encontrada por el foro, no recuerdo de quien
end;

Ahora ya puedo asignarle al evento OnKeyPress de los 9 TEdit la misma rutina
Gracias a todos.
Responder Con Cita