Subject Re: [IBO] Defining field lengths in IBO4
Author Lucas Franzen
Riho-Rene Ellermaa schrieb:
>
> Hi!
>
> I once asked for a possibility to specify different field lengths for
> TIB_Edit. For example if I have CUSTOMERNAME as VARCHAR(50), then I
> sometimes want to let the customer enter only 35 characters and sometimes
> 50.


If you're doing this with just one field and want just a quick and dirty
workaround you can use the OnKeyPress event of the TIB_Edit:


with TEdit ( Sender ) do
begin
if ( key <> #8 ) AND ( length ( Text ) - SelLength >= 35 ) then key
:= #0;
end;

(okay, you could still get around that with pasting some existing values
in the edit...)

Luc.