Y le añado lo primero que puse???
Y si quiero limitarlo a un número determinado de caracteres???
vale con poner: or (SelStart + SelLength >x) ??
Código Delphi
[-]procedure TForm1.EditKeyPress(Sender: TObject; var Key: Char);
begin
with Sender as TEdit do
ReadOnly := (SelStart + SelLength = 0) and (Key in ['0'..'9']) OR ((SelStart + SelLength >longitud);
end;
PD: Me parece impresionante...
Gracias..