How to set the focus on a control inside a containercontrol ?

there seems to be a problem, the focus is rarely set on the control you specify with setfocus.
outside a containercontrol no problem, but inside I’m loosing my minds with this.

anyone has a clue ?

following this old thread :

@Jean-Yves Pochez I looked back to some tests I did several years ago. I never could solve this problem… It seems to me that ContainerControls are handled as separate ‘windows’!

sad to learn that I’m not alone with that problem …
thanks for replying.

even if they are handled like windows (which they are) it should be possible to set the focus on one element of the CC.

The last time I needed to pull this off, I had success with a method on the ContainerControl that would SetFocus to one of the controls within. Then on the container’s instance, I would call that method. I don’t recall having issues with this process.

I was just thinking on something like this. will definitely try it. thanks.