Ribbonbar on w7 and 10

Ribbonbar on w7 and 10

Postby Silvio.Falconi » Tue Apr 02, 2019 8:39 am

I have problem to show ribbonbar on Win 7 and 10 because the colors are not the same of winword office

Image

I wish change the color of button and the tab
when I select a tab not see clear the text on the tab

I'd like have this style
Image

I was hoping that the changes made by Navarro were included in the latest version of fwh but are not included
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbonbar on w7 and 10

Postby armando.lagunas » Wed Apr 03, 2019 11:22 am

yo tengo mi estilo personal, modifica la clase tribbonbar, tribbonbutton, creando tu estilo propio y le colocas las definiciones de colores que necesites, las clases modificadas las incluyes como un prg mas a tu proyecto y tienes lo que necesitas

yo creé un estilo nuevo lWin10 en el include ribbon.ch

Code: Select all  Expand view  RUN
#xcommand DEFINE RIBBONBAR [ <oRBar> ] ;
                           [ <of:OF, WINDOW> <oWnd> ] ;
                           [ <prm: PROMPT, PROMPTS, ITEMS> <cPrompt,...> ] ;
                           [ <act: ACTION, EXECUTE, ON CHANGE> <uAction> ] ;
                           [ OPTION <nOption> ] ;
                           [ HEIGHT <nHeight> ] ;
                           [ TOPMARGIN <nTopMargin> ];
                           [ COLOR <nClrPane> ] ;
                           [ <ColorBox: COLORBOX> <nClrBoxOut>,<nClrBoxIn> ] ;
                           [ <ColorSel: COLORSEL> <nClrBoxSelOut>,<nClrBoxSelIn> ] ;
                           [ <l2010: 2010, _2010> ];
                           [ <l2013: 2013, _2013> ];
                           [ <lWIN10: WIN10, _WIN10> ];    <---
                           [ STARTBTN <nStart> ];


toma como referencia en la clase el método l2010 o el l2013 y modificas a tu gusto los colores

ejemplo:
Code: Select all  Expand view  RUN

   ELSEIF l2013

           nTopMargin    := 25
           nClrPaneRB    := RGB( 255, 255, 255 )
           nClrBoxOut    := RGB( 192, 192, 192 )
           nClrBoxIn     := RGB( 255, 255, 255 )
           nClrBoxSelOut := RGB( 255, 255, 255 )
           nClrBoxSelIn  := RGB( 255, 255, 255 )
           aGrad         := { { 1, RGB( 255, 255, 255 ), RGB( 255, 255, 255 ) } }
           aGradFld      := {| nOpt | if( nOpt == ::nStart, { { 1, RGB( 255, 255, 255 ), RGB( 255, 255, 255 ) } },;
                                                { { 1, RGB( 43, 87, 154 ), RGB( 43, 87, 154 ) } } ) }
           aGradHigh     := { { 1, RGB( 255, 255, 255 ), RGB( 255, 255, 255 ) } }
           aGradOver     := { { 1, RGB( 255, 255, 255 ), RGB( 255, 255, 255 ) } }

    ELSEIF lWin10

           nTopMargin    := 25
           nClrPaneRB    := RGB(   0,  68, 118 )   // Panel de Fondo Trasero
           nClrBoxOut    := RGB(   0, 101, 184 )
           nClrBoxIn     := RGB(   0,  60, 108 )
           nClrBoxSelOut := RGB(   0, 101, 184 )
           nClrBoxSelIn  := RGB(   0,  88, 148 )
           aGrad         := { { 1, RGB(   0,  60, 108 ), RGB(   0,  46,  83 ) } }                                     // PANEL FRONTAL
           aGradFld      := {| nOpt | if( nOpt == ::nStart, { { 1, RGB(   0,  72, 161 ), RGB(   0, 146, 229 ) } },;
                                                { { 1, RGB(   0,  38,  83 ), RGB(   0,  60, 108 ) } } ) }
           aGradHigh     := { { 1, RGB(   0,  97, 145 ), RGB(   0, 111, 165 ) } }
           aGradOver     := { { 1, RGB(   0,  78, 138 ), RGB(   0,  64, 123 ) } }

 


está en el método new, de la ribbonbar y en la ribbonbutton

resultado como ejemplo de mi estilo propio

Image
SkyPe: armando.lagunas@hotmail.com
Mail: armando.lagunas@gmail.com
User avatar
armando.lagunas
 
Posts: 346
Joined: Mon Oct 05, 2009 3:35 pm
Location: Curico-Chile

Re: Ribbonbar on w7 and 10

Postby Silvio.Falconi » Wed Apr 03, 2019 4:08 pm

Cristobal made a new release of tribbon

DEFINE RIBBONBAR [ <oRBar> ] ;
[ <of:OF, WINDOW> <oWnd> ] ;
[ <prm: PROMPT, PROMPTS, ITEMS> <cPrompt,...> ] ;
[ <act: ACTION, EXECUTE, ON CHANGE> <uAction> ] ;
[ OPTION <nOption> ] ;
[ HEIGHT <nHeight> ] ;
[ TOPMARGIN <nTopMargin> ];
[ COLOR <nClrPane> ] ;
[ <ColorBox: COLORBOX> <nClrBoxOut>,<nClrBoxIn> ] ;
[ <ColorSel: COLORSEL> <nClrBoxSelOut>,<nClrBoxSelIn> ] ;
[ <l2010: 2010, _2010> ];
[ <l2013: 2013, _2013> ];
[ STARTBTN <nStart> ];
[ <l2015: 2015, _2015> ];
[ <l2016: 2016, _2016> ];

but this version there is not on the last package

My problem are RbBtn colors I wish have the same colors when we use buttons on buttonbar 2015
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbonbar on w7 and 10

Postby Silvio.Falconi » Thu Apr 04, 2019 8:39 am

Sorry ,
I made a n mistake

on last releae there is the option l2016

Using the ribbon class I found an error

I explain you I set

::oRebar := TRibbonBar():New(::oWndMain, aRbPrompts,,nOption,,nHeightRib, 26, , ,,,,,,,,.t.,)
::oRebar:l2016:=.t.
::oRebar:nRoundBox := 0

I see right the color of text of tabs but the grad of the RBBTN must be as when the ribbonbar is l2013

Perhaps there is ar error on TRBBTN class

When I use l2016 I see the color of rbbtn like 2007

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbonbar on w7 and 10

Postby Silvio.Falconi » Thu Apr 04, 2019 8:52 am

I found the error

Create a rIbbonbar with L2016 colors

::oRebar := TRibbonBar():New(::oWndMain, aRbPrompts,,nOption,,nHeightRib, 26, , ,,,,,,,,.t.,)
::oRebar:l2016:=.t.


If I create a GROUP

ADD GROUP oGr1 RIBBON ::oRebar TO OPTION 2 WIDTH 480 PROMPT "Gestione"

to have the colors blue for the rbbtn as l2013 I must set

oGr1:l2013:=.t.

and then run ok for the colors on Windows 2010


Image


only the border of the rbbtn is yellow and it must be white or clear gray... SAMPLE oBtn[10]:nClrBoxOut := CLR_HGRAY
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 39 guests