Setting TabPanel color

I have read exhaustive threads on how you “possibly” change the background color of a Tab index or even make a Container control from a PagePanel and do it yourself. Lost of people giving advice about putting a rectangle control and canvas behind the tab etc.

I essentially need to change the background of both the panels themselves as well as the space to the right of the tab tops.

Outside of the complaint that XOJO is dictating what color scheme I can and can’t have in a program, I dearly want to bump in to guru that can put me straight.

I’ve tried:

  1. Creating a container class to make my own PagePanel - can’t then have access to the pages/panels at design time to put the controls on
  2. Creating a runtime rectangle control with color and trying to position it within panel. Puts the control at ZOrder topmost and I cannot reset the ZOrder thru SetWindowPos API call because Tab&Page Panel is not a control group container so I cannot work out the first control is within a panel (when there are multiple panels) to set the ZOrder to.
  3. I read how a TabPanel will inherit the color scheme of its parent - Not true - tried all up to the latest version 2017v1.1

… I can go on with what I’ve tried, but all points return to can’t do it. HELP

I have produced a pagepanel control that turns a pagepanel into a tabpanel with controls over colour, font, font size, background colour, highlight colour etc.

I don’t have access to my development machine just now but if you go to my website:

It is on my free Xojo Controls page.

A separate canvas is way easier to handle. Like Simon’s code my own tab panels use a canvas (Trixi’s Tab Panels at My version uses a fixed color scheme. If you want to change that I can send you the original file.