Frances,
Glad to hear you got it working.
I now see that you were talking about the tab color and I was thinking the button hover color.
Frances,
Still no class modification.
James Bott wrote:Frances,
Still no class modification.
There is still at least one thing you cannot do without class modification. You cannot draw group separator bars without also drawing outlines. This is a show-stopper if you want an exact look like Office.
All that needs to be done is to provide a new color variables for separator bars which defaults to the same colors as "box" outlines. Then when you set the outlines to the same color as the ribbonbar (to make them disappear), then you can still set the color of the separator bars to whatever color you wish.
It would also be nice to have this new color as a passable parameter to the button's New() method.
However, I think a much better way to do this is by adding color variables to the ribbonbar class that will then automatically passed to every button by passing the oBar which is already happening.
James
ADD GROUP oGr1 RIBBON oBar TO OPTION 1 WIDTH 120 PROMPT "Work Log"
// Controls the group title text color
oGr1:nClrTxt := RGB( 224,224,224 ) // Black theme
// These 2 control the separator bar colors
oGr1:nClrBoxOut:= RGB(102,102,102) // Black theme
oGr1:nClrBoxIn:= RGB(102,102,102) // Black theme
Silvio wrote:
But You could make an Override to RibbonBar(rbgroup,rbtn) Class
if oWnd:IsKindOf( "TRPANEL" ) .and. oRB != NIL
#define CLRTEXT RGB( 21, 66, 139 )
.../...
oRBar:nClrPaneRB := Rgb( 43, 87, 154 )
nClrTabText := CLR_WHITE
For x = 1 to Len( oRBar:aClrTabTxt )
oRBar:aClrTabTxt[ x ] := { | oSelf, nPrompt | ;
if( oSelf:l2013 .or. oSelf:l2015,;
if( nPrompt == oSelf:nOption, RGB( 255, 255, 255 ), ;
if( oSelf:l2015, nClrTabText, RGB( 100, 100, 100 ) ) ),;
if( oSelf:l2016, ;
if( nPrompt == oSelf:nOption, ;
oRBar:nClrPaneRB, nClrTabText ), CLRTEXT ) ) }
Next x
James Bott wrote:Frances,
Do you have any idea how to change the tab text color when hovering over it. The blue theme has white text on a dark blue background, then when you hover over it the tab background turns white and thus the text disappears. I need to change the text on the tab to a dark color when you hover the pointer over it.
Any ideas?
Thanks,
James
:aGradOver := { { 1, nRGB( 0, 114, 198 ), nRGB( 0, 114, 198 ) } }
...
FOR i := 1 TO Len( :aPrompts )
:aClrTabTxt[ i ] := {|oSelf, nPrompt| iif( nPrompt == oSelf:nOption, nRGB(0,0,0), nRGB( 255, 255, 255 ) )}
NEXT
...
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 51 guests