Hi,
I'll explain the situation briefly:
A form with a ultratoolbarsmanager shows the ribbon which has 1 tab with 2 groups which have several tools.
When a tool in group 1 is clicked it must have the backcolor, backcolor2 and backgradientstyle of the default Office2007 hottrack appearance.
I know how and where to change it but I don't know what the default colors are nor where to find them.
This is what I tried:
tTool.InstanceProps.AppearancesLarge.Appearance.BackColor = tTool.InstanceProps.AppearancesLarge.HotTrackAppearance.BackColor;tTool.InstanceProps.AppearancesLarge.Appearance.BackColor2 = tTool.InstanceProps.AppearancesLarge.HotTrackAppearance.BackColor2;tTool.InstanceProps.AppearancesLarge.Appearance.BackGradientStyle = tTool.InstanceProps.AppearancesLarge.HotTrackAppearance.BackGradientStyle;
There must be an easy way to find the value of those properties?
The appearances are always empty by default. If these properties are set, they will be used. Otherwise, default colors from a color table will be used. You can access these color from the Office2007ColorTable class. You would definately need to use this to set the selected appearance on a non-selected ribbon tab. However, as far as making the button always look hot-tracked, it looks like you should instead use a StateButtonTool and set its Checked property to True when you want it to have that appearance. The checked and hot-tracked appearances are very similar.
My code doesn't work. That is why I asked the question :p
I noticed that all InstanceProps.Appearances are empty as well as the SharedProps.Appearances of my tools. Probably the appearance gets set by a control higher up the chain (the Ribbon itself maybe).
Hopefully a dev can help us soon!
I have a similar problem, but I require the defaults for the SelectedAppearance of a tab. Did your code work? When I do it, the UI does not change.
~Michael