TabPane Tab Background color

Hello !

I would like to paint every single “Tab” title in a different color (background and font-color).
Is this possible ?

[quote=218175:@Alex Jungwirth]Hello !

I would like to paint every single “Tab” title in a different color (background and font-color).
Is this possible ?[/quote]

Nope. Use a Rectangle as background.

Last weeks I’ve made an applications’ GUI , and experienced just this sort of thing as NOT R.A.D. Quite some work to make something nice looking, especially under Windows where you have to deal with side effects.

RAD is the opposite of customization.

Contrary to popular belief you can’t have your cake and eat it. :wink:

That being said, doesn’t Alex Restrepo’s tab panel support different colours?

Setting a panel backcolor is possible in VB. NET TabControl, so I believe it should be possible to do the same with declares in Xojo’s TabPanel which is based on the native control.

The fact that we need to pour a lot of work in the UI to make it look good is not necessarily a RAD thing. To me, RAD is the possibility to quickly whip up an app with a minimum of efforts, thanks to the high level of abstraction provided by Xojo. Thanks also to the limited choice of properties.

Very often, I can build the core of a program in a couple hours and get the functionality right, but then it takes me a week or two to get the UI nice looking and ship shape.

That is where comes the tabs backcolor, or even back pictures. Sure, it is possible in the Windows framework. But in typical paradox of choice manner, so are possible zillions of other things. The simple description of the TabControl class takes 20 pages or so at https://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.aspx .To me such a choice is like having 15 different salad sauces to choose from. It is the opposite of RAD. I rather have one page or two at http://documentation.xojo.com/index.php/Tabpanel

In Xojo, I drop a rectangle on the tab, add a bit of code into it to make sure it keeps to the same size as its parent, and am done. It is frankly not the end of the world.

Xojo is a bit like those small cars we used to have in the sixties that started innocent, but after much customization, roared like grown up supercars. Except they remained easy to drive, unlike Formula One monsters. Fact is, it takes a lot more work in Visual Studio or XCode to make a nice looking app than in Xojo.

But not a .Net control
Win32 at best
I believe this is the correct reference
https://msdn.microsoft.com/en-us/library/windows/desktop/bb760550(v=vs.85).aspx#tab_control_styles

[quote=218248:@Norman Palardy]But not a .Net control
Win32 at best
I believe this is the correct reference
https://msdn.microsoft.com/en-us/library/windows/desktop/bb760550(v=vs.85).aspx#tab_control_styles[/quote]

Apparently CreateWindowEX is used to create the control at the page you link (thank you), so it should inherit window styles and possibly permit changing the backcolor.

Being perfectly satisfied with the rectangle or canvas solution, though, I do not intend to spend hours coming up with the declare at this point :wink: