Ver Mensaje Individual
  #4  
Antiguo 02-02-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Código Delphi [-]
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
var pos: Cardinal;
begin
 with Sender as TEdit do
  begin
   pos := System.Pos(',', Text);
   if not LongBool(Pos) then Dec(Pos);
   ReadOnly := not (Key in ['0'..'9', ',', #8]) or
               (Pos <> $FFFFFFFF) and (Key = ',') or
               ((Key <> #8) and (Pos < (SelStart - 1)));
  end;
end;
Responder Con Cita