Board index » delphi » Howto: auto advance to next control when a TEdit's maxlength is reached

Howto: auto advance to next control when a TEdit's maxlength is reached

Hi all,

See subject

TIA

Bert.

 

Re:Howto: auto advance to next control when a TEdit's maxlength is reached


Put this in the OnChange event of your TEdit

  if Length(TEdit(Sender).Text) = TEdit(Sender).MaxLength then
    NextControl.SetFocus;

HTH

Arno

Re:Howto: auto advance to next control when a TEdit's maxlength is reached


Arno,

Thanks I will try this

Bert.

Quote
<AVerhoe...@chromalloy.com> wrote in message

news:3e3e905d@newsgroups.borland.com...
Quote
> Put this in the OnChange event of your TEdit

>   if Length(TEdit(Sender).Text) = TEdit(Sender).MaxLength then
>     NextControl.SetFocus;

> HTH

> Arno

Other Threads