I am running Lazarus 0.9.30.2. I have a TForm on which there is a TPageControl. Within the TPageControl there is a series of TTabSheets (about 30 of them). What I want to do is colour code the tabs, so the first 10 are Red, next 10 are Blue and the last 10 are Green. I have seen code snippets on the intranet that change the tab sheet colour (including the tab itself) when you click on them and navigate to them (to highlight the active tab), but what I want to do is colour them as described above when the tab sheets are first loaded.
Is there are way to do this?

If it's enough for you to get a little bit tricky solution working only on Windows with themes disabled then try the following:
Un-check the
Use manifest file to enable themes (Windows only)option fromProject / Project Options ...project settings dialog and paste the following code into your unit with page control. It uses the interposed class, so it will work only in units where you paste this code.Here is how it looks like (ugly :)