need help with custom TabPanel contents.

I am doing a desktop app that has a TabPanel On it.
Inside each panel there is one control.
All panels of the tab panel are identical.
In the IDE when I put the TabPanel on the window, within its window I put my control.
But this is an instance and what I need is an object that can be told which ‘instance’ to display.
As I understand it the tab panel control only changes the heading, its up to you to draw the contents of each tab manually…

Are control arrays still a thing? Do you remember how to create one on a window?

If i just create a subclass of the control and have a property that is the same as the tab index then when that property changes I can redraw the control?

I’m no expert, just trying to be helpful. The TabPanel shows/hides the controls you have placed in the different tabs, no need to draw the contents manually.

So you need to know in advance how many tabs there will be and what controls go in each at design time?

not at all - if you have populated each tab with xojo controls switching tabs will cause the controls on the other tab to draw

you can add panels at runtime
and. like anything else, you can add controls dynamically by way of control sets or using container controls