Hi,
I have a custom palette set containing multiple palettes, and I'd like to change the color of a palette tab depending the context. My goal is to obtain something similar to the TabSelectorRules when you can specify aTheme. Sometimes a picture is worth a 1000 words :
For information, I already tested to change the background color by implementing the OnEraseBkgnd (message ON_WM_ERASEBKGND). It "works" but the color is applied only in the content of the palette and not to the edges and the tab. I need exactly the opposite.
Last info, object classes I'm using are CAdUiPaletteSet and CAdUiPalette.
Any suggestions are welcomes.
Regards,
Jonathan
Solved! Go to Solution.
Solved by Balaji_Ram. Go to Solution.
Hi Jonathan,
Sorry, I havent got it working yet.
I have tried to get this working by handling "OnNcPaint" of the CAdUiPaletteSet class along with "GetWindowRect".
It sets the color of the tab portion of the paletteset briefly but is soon replaced by AutoCAD's palette color.
I have contacted our engineering team to see if this is possible. I will keep you updated.
Regards,
Balaji
Many thanks for your help Balaji. I will have a look to your "solution".
I hope you will find a permanent way to set the color of the tab.
Regards,
Hi Jonathan,
Sorry, I do not think this is possible to do.
Here is the feedback that I received from my colleague in engineering :
<<<
There is nothing in the public API for what the developer is trying to do. Nor do I recommend that we attempt to override the draw code.
It is not an easy thing to do and in fact, more likely than not, it is impossible.
The palette code, which is pretty much all custom draw will most likely override the changes.
>>>
Regards,
Balaji
Ok thank you, bad news. Maybe you can keep it as a suggestion for the next releases? Something in the API to be able to apply a theme (blue, cyan, purple, ...) on a palette (like a panel in the ribbon).
Regards,