Control and Parent

specci48

Well-Known Member
Licensed User
Why do you need that?
Since the parent of a control cannot be changed at runtime, the parent is always known. So you can implement everything during design time.

specci48
 

specci48

Well-Known Member
Licensed User
:signOops:
An undocumented feature of the formlib...
Because I browsed through the help files and there is no hint of a changeParent function :sign0161:

Well, after all I don't think you can't get the parent of a control by runtime.
Maybe Erel can add this feature to the formlib (and make a small comletion to the help file, too ... ;))


specci48
 

magi6162

Well-Known Member
Licensed User
I don't use in changeparent.
I create controls to runtime and after i use un for.. next and i need to know the parent.
Otherwise I make in other way, plus complicated
sorry, my bad english

magi6162
 

agraham

Expert
Licensed User
If you create the controls at run time then you must be specifying the parent then, so you could keep track of the controls and their current parent in a 2-dimensional array. Alternatively you could keep the controls in an ArrayList to use its in-built searching (IndexOf) and keep the current parent in another array at the same index.
 
Top