need help with custom TabPanel contents.

  1. 4 days ago

    Brian O

    Mar 24 Pre-Release Testers Calgary, AB

    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?

  2. 3 days ago

    As I understand it the tab panel control only changes the heading, its up to you to draw the contents of each tab manually...

    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.

  3. Brian O

    Mar 24 Pre-Release Testers Calgary, AB

    @HectorMarroquin 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?

  4. Norman P

    Mar 24 Pre-Release Testers, Xojo Pro outside drowning sorrows
    Edited 3 days ago

    @Brian OBrien As I understand it the tab panel control only changes the heading, its up to you to draw the contents of each tab manually...

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

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

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

or Sign Up to reply!