Hello Xojo Developers,
this is my first post here.
I found out an interesting behavior of the Container Control that I would like to share with you.
As you all probably know it is not possible to inherit from a Container Control once you've put controls to it in the design editor.
I always found this annoying when you want to reuse the container control and only rearrange the controls you have added to it.
Now I have found a nice workaround:
Define the container control as a class and add the controls as properties.
You can code all the logic in this class. Event handling is a bit tedious though, as you have to use addHandler.
Now you can add a container control to the project which inherits from your class and and place a control for every control property.
In the constructor of the new container you assign the controls from the layout to the control properties:
parentTextfield = layoutTextfield
parentButton = layoutButton
Now you can reuse the container with different layouts or add additional controls and functionality.
Greetings from Germany