How to do a Setfocus on a Dynamically created visual component (Syntax)
Posted on 2004-09-17
In this project, there are multiple controls dynamically created based on a the contents of a data set that defines them. That part is all up and running. As they are created, I set the TAG component and relate it to the DB definition so that I can go back and find the component.
I am using the search components[I] technique below to find the component.
Var TargetComponent: Integer;
For I:=1 to ComponentCount -1 do
If Components[I].Tag = TargetComponent then
Components[I]. xxxxx .SetFocus; <================= Help here.
Since components are not established at Design Time, working to locate, and then reference some of the components values, and get Focus set to that control based on another program event. Having problems with the Syntax to get the .SETFOCUS part to work.