
Double click on the Container in the Library so it is added to the Navigator in the IDE. Open Xojo and create a new Desktop project.

XOJO TRY NOT WORKING PLUS
Plus we’ll make them adjust as the size of the Container changes like you see in this example below. In order to see how this works, this example creates a Desktop project that includes multiple DesktopButton instances at runtime while also removing them from the target DesktopContainer (calling the Close method on the instance to do that). These values are relative to the left/top corner of the target window/container, so a value of top = 0 and left = 0 means to add the control at the top/left corner of the target window itself. To make the new DesktopUIControl instance really visible in the target window or container, you’ll need to set some basic properties specifically the desired width and height values for the new instance control and also the left and top coordinate values where you expect the control to be added. The new AddControl method on DesktopWindow and DesktopContainer accepts any DesktopUIControl instance you want to add to a window or container. Continue reading and I will show you how!

Instead of having to deal with control arrays, when you use Xojo 2021r3 or later you can call the new AddControl method on the DesktopWindow (or DesktopContainer) where you want to add the new control. The process of adding new controls to windows (or containers) at runtime has been greatly simplified.
