can I have a sample test to try your 2016 style please ?
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
can I have a sample test to try your 2016 style please ?
Sorry Silvio, I don't have anything working yet that you could try. I am still trying to figure out which variables do what. I will probably have to modify 2 to 3 classes also.


#define _nClrPaneRB Â Â Â RGB( 68, 68, 68 )
#define _nClrBoxOutRB Â Â RGB( 178, 178, 178 )
#define _nClrBoxInRB Â Â Â RGB( 178, 178, 178 )
#define _nClrBoxSelOut   RGB( 178, 178, 178 )
#define _aGradRB Â Â Â Â Â { { 1, RGB( 178, 178, 178 ), RGB( 178, 178, 178 ) } }
#define _aGradFldRB Â Â Â {|nOpt| iif( nOpt == oMDIRibon:nStart, { { 1, RGB( 178, 178, 178 ), RGB( 178, 178, 178 ) } },;
                                 { { 1, RGB( 178, 178, 178 ), RGB( 178, 178, 178 ) } } ) }
#define _aGradHighRB Â Â Â { { 1, RGB( 178, 178, 178 ), RGB( 178, 178, 178 ) } }
#define _aGradOverRB Â Â Â { { 1, RGB( 178, 178, 178 ), RGB( 178, 178, 178 ) } }
#define _nCtrlFrGround   RGB( 255, 255, 255 )
#define _nCtrlBkGround   RGB( 106, 106, 106 )
#define _nClrBoxOut    RGB( 160, 160, 160 )
#define _nClrBoxIn     RGB( 160, 160, 160 )
#define _nClrTxt      RGB( 0, 0, 0 )
#define _bClrGradNormal  {|lPressed| iif( lPressed, { { 1, _nClrBoxOut, _nClrBoxOut } },;
                           { { 1, _nClrBoxOut, _nClrBoxOut } } ) }
#define _aClrGradUnder   {|| { { 1, _nClrBoxOut, _nClrBoxOut } } } //----for popup
#define _aClrGradBack   { { 1, _nClrBoxOut, _nClrBoxOut } }...
oRbn := TRibbonBar():New( oMDIFrame,aDlgs,bAction,,,120,40,_nClrPaneRB, _nClrBoxOutRB, _nClrBoxInRB,;
                    ,_nClrBoxSelOut, _aGradRB, _aGradFldRB,_aGradHighRB,_aGradOverRB,,;
                    ,,,.T.)
...
oRbn:aClrTabTxt[ 1 ] := {|oSelf, nPrompt| iif( nPrompt == oSelf:nOption, RGB( 0,0,0 ), RGB( 255, 255, 255 )) }
...
oRbnBtn := TRBtn():New( 4, Â 5, 40, 52, 'new26',,aTaskGrp[ nGRPEDIT ],,,,,'New',,,,'TOP',,'New Detail Entry',,,,,_bClrGradNormal,,,_aClrGradUnder,_aClrGradBack,,,,,,,,,_nClrBoxIn,_nClrBoxOut,,.T.)
...
Frances,
Thanks for the code examples and the screen to gif link. I do see that you are also defining the button colors as I did. This could end up being a lot of code if you have 30 or 40 buttons.
It is midnight here now. So I will look at them again in the morning.
Frances wrote:
But I have one issue on mouse hovering the Ribbon which I like it on blue.
#define _bClrGradNormal  {|lPressed| iif( lPressed, { { 1, _nClrBoxOut, _nClrBoxOut } },;
                           { { 1, _nClrBoxOut, _nClrBoxOut } } ) }#define _bClrGradNormal  {|lPressed| iif( lPressed, { { 1, _nClrBoxOut, _nClrBoxOut } },;
                           { { 1, RGB(194,213,242), RGB(194,213,242) } } ) }James Bott wrote:Frances,
OK, back to your original question.
To this:
#define _bClrGradNormal  {|lPressed| iif( lPressed, { { 1, _nClrBoxOut, _nClrBoxOut } },;                            { { 1, RGB(194,213,242), RGB(194,213,242) } } ) }
Let me know if that works for you.
Frances,
Here is my exact code:
@ 2,5 ADD BUTTON oBtn1 GROUP oGr1 PROMPT "New" BITMAP ".\bitmaps\document_color_blue.BMP" ;
NORMAL ROUND SIZE 50,65 ACTION msgInfo("New Work Entry Here") tooltip "New Work Log Entry"
oBtn1:bClrGradNormal := {|lPressed| iif( lPressed, { { 1, RGB(194,213,242), RGB(194,213,242)} },;
{ { 1, RGB(194,213,242), RGB(194,213,242) } } ) }
This is working for me. Try it like that.
I am also wondering if you are passing the value in the wrong location when you are defining the button. Or, perhaps it is getting redefined in the New() method. The above method is defining the colors AFTER the New() method.
James
I am also wondering if you are passing the value in the wrong location when you are defining the button. Or, perhaps it is getting redefined in the New() method. The above method is defining the colors AFTER the New() method.

...
#define _aGradOver { { 1, nRGB( 0, 114, 198 ), nRGB( 0, 114, 198 ) } }
......
oRbn:aGradOver := _aGradOver
...James Bott wrote:Frances,
From my previous message:
I am also wondering if you are passing the value in the wrong location when you are defining the button. Or, perhaps it is getting redefined in the New() method. The above method is defining the colors AFTER the New() method.
I have counted the commas in the new() method and the codeblock should be after the 21st comma, and it is after the 22nd comma. Try moving it up one position.
James
oRbn := TRibbonBar():New( oMDIFrame,aDlgs,bAction,,;
,120,40,_nClrPaneRB,_nClrBoxOutRB,_nClrBoxInRB,;
_nClrBoxSelOut,_nClrBoxSelOut,_aGradRB,_aGradFldRB,_aGradHighRB,;
_aGradOver,,,,,,.T.)
with object oRbn
:nHeightFld := 26
:hSeparation := 6
:nLeftMargin := 10
:nRoundBox := 0
endJames Bott wrote:Frances,
Here is my exact code:
@ 2,5 ADD BUTTON oBtn1 GROUP oGr1 PROMPT "New" BITMAP ".\bitmaps\document_color_blue.BMP" ;
NORMAL ROUND SIZE 50,65 ACTION msgInfo("New Work Entry Here") tooltip "New Work Log Entry"
oBtn1:bClrGradNormal := {|lPressed| iif( lPressed, { { 1, RGB(194,213,242), RGB(194,213,242)} },;
{ { 1, RGB(194,213,242), RGB(194,213,242) } } ) }
This is working for me. Try it like that.
I am also wondering if you are passing the value in the wrong location when you are defining the button. Or, perhaps it is getting redefined in the New() method. The above method is defining the colors AFTER the New() method.
James
 WITH OBJECT oRbn
   oGrp := :AddGroup( 130, 'Editing', nDlg )
   WITH OBJECT oGrp
     :aGradCaption := _aClrGradBack
     :nClrBoxOut  := _nClrBoxOut
     :nClrBoxIn   := _nClrBoxIn
     :nClrTxt    := _nClrTxt
   END
   oBtn := TRBtn():New( 4,  5, 40, 52, 'new26',,aTaskGrp[ nGRPEDIT ],,,,,'New',,,,'TOP',,;
                           'New Detail Entry',,,,,_bClrGradNormal,,,_aClrGradUnder,_aClrGradBack,,,,,,,,,_nClrBoxIn,_nClrBoxOut,,.T.)