What do you use for control grouping?

In other languages there’s something called a “Pane” which you can basically make invisible to the UI but it can be used to contain controls.

This can be used for all sorts of things, including inherited movement tracking, so you only have to resize the pane, and all items inside the pane then calculate their position based on the size of its parent, the pane. It makes it a lot easier to make complicated UI and make modifications to it later.

I see there is PagePanel which you could just keep to Panel 0 but is there a cut down/raw version of this or does everyone just use that and live with the < 0 \/ > spam over their UI in the IDE?

Thanks!

Container Control?
Answers makes heavy use of them.

http://developer.xojo.com/userguide/desktop-container-controls

Thank you both, excellent! :slight_smile:

Note that Canvas can also be used as a container. It is probably closer to your description of the “Pane”. If you place controls as children of the Canvas, then they behave as contained in the canvas.

The possible benefit is that you do not need to prefix controls with the name of the instance of the ContainerControl.

Ahh brilliant Michel, thanks!

Thats really was I was after as I dont really want to have it as a separate component of the project only to have to drop it in the WIndow later, but that does have its own advantages of re-usability around the project, both options are perfect.

Thanks all, just what I was after.

BTW in terms of reusability, you can copy/paste or duplicate a Canvas with all the controls it bears. But you cannot make it external or export the canvas with its children.