I created a special form with the opening of 4 frames.
The result I would like to see is this

But unfortunately, I have this for the moment


I created the form by code and the 4 frames set up through a grid; But it does not work, why not?
Below the code

Is there a solution to this, please?
Thanks in advance.
Andrew