Gracias por los aporte.
He probado los siguiente, según indicaciones de nlsgarcia, pero en tiempo de ejecución me sale siguiente error: Access violation at address 040E915 in module prueba.exe. Read of Address 00000008.
procedure TFprincipal.DBDatosKeyPress(Sender: TObject; var Key: Char);
begin
if DBdatos.Fields[DBDatos.SelectedIndex]=
(DBDatos.DataSource.DataSet.FieldByName('Proveedor')) then
begin
if DBDatos.Controls[0] is TInPlaceEdit then
with DBDatos.Controls[0] as TInPlaceEdit do
begin
if (GetTextLen >= 10) and (Key <> #8) then
begin
Key := #0;
ShowMessage('Máxima longitud alcanzada');
end;
end;
end;
end;
No sé donde puede estar el error.
Gracias por vuestro interes.
|