Aaron thanks for the tip - but to make it work I had to

  TnkmParent = class(TWinControl)
  protected
    procedure GotoNextControl(From: TWinControl);
  end;

with

procedure TnkmParent.GotoNextControl(From: TWinControl);
var
 C: TWinControl;
begin
  C := FindNextControl(From,True,True,False);
  if C <> nil then C.SetFocus;
end;

and then in my component

procedure TnkmCustomEdit.AutoExit;
var
  P :TnkmParent;
begin
  P := TnkmParent(Parent);
  P.GotoNextControl(Self);
end;

all because FindNextControl is protected and i need to call it for my
controls parent

Am I missing something?

Regards Neven

N.K. MacEwan B.E. E&E




----- Original Message -----
From: Aaron Scott-Boddendijk <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, 3 February 2000 14:09
Subject: Re: [DUG]: AutoExiting a Control


> > A quick question what is the best way to get a control to exit itself
(i.e
> > fake TAB being pressed)\
>
> function FindNextControl(CurControl: TWinControl;
>       GoForward, CheckTabStop, CheckParent: Boolean): TWinControl;
>
> EG in your Listbox on click you could use something like
>
> var
>   C :TWinControl;
> begin
>   C := LB.FindNextControl(LB,True,True,False);
>   if C<>nil the C.SetFocus;
> end;
>
> --
> Aaron Scott-Boddendijk
> Jump Productions
> (07) 838-3371 Voice
> (07) 838-3372 Fax
>
>
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to