Subject | Re: [IBO] Defining field lengths in IBO4 |
---|---|
Author | Lucas Franzen |
Post date | 2001-08-30T14:23:20Z |
Riho-Rene Ellermaa schrieb:
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.
>If you're doing this with just one field and want just a quick and dirty
> 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.
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.