How to change tab colour of wxAuiNotebook??

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
nandakishore
Experienced Solver
Experienced Solver
Posts: 57
Joined: Wed Feb 25, 2015 2:09 pm
Location: Chennai, India

How to change tab colour of wxAuiNotebook??

Post by nandakishore »

Hi,
Currently i'm using wxWidgets 3.0 version, windows 8 os, i want to change the color of wxAuiNotebook tabs.
Is it possible to do so??
please see the attachment for clear details of my question.

Thanks,
Attachments
auinotebook.png
auinotebook.png (30.87 KiB) Viewed 2305 times
Got a Problem???..No worry..Focus on Solution not on Problem :P
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: How to change tab colour of wxAuiNotebook??

Post by New Pagodi »

You'll have to derive a class from wxAuiTabArt and then call SetArtProvider() with an object of that class. I don't think there are any examples, but you can look at the source files src\aui\tabart.cpp, src\aui\tabartgtk.cpp, and src\aui\tabartmsw.cpp to see what's involved.

Looking at the documentation, you might just be able to cut and paste on of the existing tab arts and change the SetColour and SetActiveColour methods.
nandakishore
Experienced Solver
Experienced Solver
Posts: 57
Joined: Wed Feb 25, 2015 2:09 pm
Location: Chennai, India

Re: How to change tab colour of wxAuiNotebook??

Post by nandakishore »

Not Clear.
Could you please explain it clearly?
Got a Problem???..No worry..Focus on Solution not on Problem :P
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to change tab colour of wxAuiNotebook??

Post by ONEEYEMAN »

Hi,
Could you explain what is not clear in New Pagodi' reply?

Create a class as a child of wxAuiTabArt, override its SetColour() and SetActiveColour() and use this class instead of the default one.

Thank you.
czczzzz
Earned a small fee
Earned a small fee
Posts: 20
Joined: Thu May 13, 2021 10:34 am

Re: How to change tab colour of wxAuiNotebook??

Post by czczzzz »

It probably too late......but

you can use wxAuiGenericTabArt()!!!!!!

I do not why no document about it .....but this is some "old school" beautiful "UI".

use it like this

auinotebook->SetArtProvider( new wxAuiGenericTabArt() );

wxAuiGenericTabArt can use both setColour() and setActiveColour()

when I check the source code I found it and I do not why it is hided.......
and check this discussion viewtopic.php?t=42059#p170481

sorry for my english......
Post Reply