Board index » delphi » Focus-Control with TAB-key fails to VCL-Component without VCL-Parent

Focus-Control with TAB-key fails to VCL-Component without VCL-Parent

There is no focus changing possible pressing a TAB-key to a dynamic
generated VCL-Component with

Parent:=nil and ParentWindow:=HParent

Reason:

In Controls.pas returns Delphi always TabOrder := -1 by components with
Parent:=nil.

How can I therefore regard a correct TabOrder > 0 for a automatic
focus-control without changing the original sources???

Many thanks for your answers in future:

Olaf M?diger

EMail:               olaf.maedi...@llg.gwdg.de
Homepage:        www.maediger.net

 

Re:Focus-Control with TAB-key fails to VCL-Component without VCL-Parent


Quote
"Olaf M?diger" wrote:
> Reason:

> In Controls.pas returns Delphi always TabOrder := -1 by components with
> Parent:=nil.

> How can I therefore regard a correct TabOrder > 0 for a automatic
> focus-control without changing the original sources???

The situation you have established prevents that from happening.
Suppose that it were possible. Then the tab order would have to
take into account every control in every application that has a
nil parent.

The whole concept of tab order is based on the parent-child
relationship. When you ignore that, you have to include the
universe of controls.

Sorry.

Kurt

Other Threads