ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change the color of a palette tab inside a palette set?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
maisoui
800 Views, 4 Replies

How to change the color of a palette tab inside a palette set?

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 :

 

paletteset_colored_tab.png

 

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

 

--
Jonathan
4 REPLIES 4
Message 2 of 5
Balaji_Ram
in reply to: maisoui

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

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
maisoui
in reply to: Balaji_Ram

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,

--
Jonathan
Message 4 of 5
Balaji_Ram
in reply to: maisoui

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

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
maisoui
in reply to: Balaji_Ram

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 (bluecyanpurple, ...) on a palette (like a panel in the ribbon).

 

Regards,

--
Jonathan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost