Ribbon tab color MICROSOFT OFFICE 2016

User avatar
José Luis Sánchez
Posts: 484
Joined: Thu Oct 13, 2005 9:23 am
Location: Novelda - Alicante - España
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by José Luis Sánchez »

Hello,
Here is a capture of one of my programs using a customized ribbonbar. It's inside a program called PicPick that shows the, IMHO, correct ribbon aspect.You can find the same approach in the file explorer of Windows 10.

Image

I'm trying to use a backstage control and I'm having a lot of problems with it. First, we have to use a TRbBtn to simulate the colored folder that allws to access the BackStage. I think that its easier using a colored folder to access the BackStage. Second, I don't know how to access the right side of the backstage.

Regards,
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

José
The back color of office16 is hgray no as 2015!!

For the backstage i not know because i not try it
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Antonio Linares »

José Luis,

Would you mind to share your changes with us ?

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
José Luis Sánchez
Posts: 484
Joined: Thu Oct 13, 2005 9:23 am
Location: Novelda - Alicante - España
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by José Luis Sánchez »

Antonio,
of course I'm going to share the customization. These are the changes I've made in my ribbon, I do it using the 2010 style as default:
* when defining the Tribbon use a size that fits the heighs of the folder and let no space in the top of them. I use 22 as nTopMargin in the New() method.

Code: Select all

::oRebar := TRibbonBar():New(::oWndMain, aRbPrompts,,,,105,22,CLR_WHITE,RGB(165,186,204),,,,,,,,.T.,)
* in tribbon class I have made several changes, first is reduce ::nLeftMagin and ::hSeparation to 5 so the horizontal gap between folders are minimal.
* In the new() method I use this color definitions in the default clause for 2010 style

Code: Select all

 nClrBoxSelIn  := RGB( 245, 246, 247 ),;
aGrad         := { { 1, RGB( 245, 246, 247 ), RGB( 245, 246, 247 ) } },; 
aGradFld      := {| nOpt | if( nOpt == ::nStart, { { 1, RGB( 245, 246, 247 ), RGB( 245, 246, 247 ) } },;
                        { { 1, RGB( 245, 246, 247 ), RGB( 245, 246, 247 ) } } ) } ,;
aGradHigh     := { { 1, RGB( 245, 246, 247 ), RGB( 245, 246, 247 ) } } ,;
aGradOver     := { { 1, RGB( 245, 246, 247 ), RGB( 245, 246, 247 ) } }
* In the original ribbon class there is a 2px gap in the bottom of the control. I painted it with the color background of the main window. Sorry, but I don't know how to reduce the vertical size of the control and adjust it. So, in the paint method after

Code: Select all

hBrush2 =  CreateSolidBrush( ::nClrPaneRB )
        FillRect( hDCMem, aRect, hBrush2 )
I added this

Code: Select all

hBrush3 =  CreateSolidBrush(GetSysColor(15) - Rgb(20,20,20 ))
        FillRect( hDCMem, {aRect[3]-2,aRect[2],aRect[3],aRect[4]}, hBrush3 )
* In PaintFld() method I changed the Drawtext call, deleting the +2 in the row position:

Code: Select all

DrawText( hDCMem, oSelf:aPrompts[ nPrompt ], { nRow, ...
[/list]
Regards,
José Luis
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

these modifies are inseted on New package of fwh ?
Good can be a L2016 parameter to load this style
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
CARLOS ATUNCAR
Posts: 41
Joined: Thu Sep 17, 2015 11:40 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by CARLOS ATUNCAR »

una consulta en versiones anteriores podia usar diferentes tipos de imagenes (Ico,Bmp) desde recursos y se ajustaba el icons segun el formato 32x32 teniendo varios formatos (16x16,32x32,48x48, etc) ahora no usa el primero que tiene, Consulta como puedo hacer para seleccionar el formato deseado. Gracias por sus respuesta
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by nageswaragunupudi »

CARLOS ATUNCAR wrote:una consulta en versiones anteriores podia usar diferentes tipos de imagenes (Ico,Bmp) desde recursos y se ajustaba el icons segun el formato 32x32 teniendo varios formatos (16x16,32x32,48x48, etc) ahora no usa el primero que tiene, Consulta como puedo hacer para seleccionar el formato deseado. Gracias por sus respuesta
Please make this modification in \fwh\source\function\imgtxtio.prg
You will see #define CNLVER in the top part of the program.
Please comment this line, compile and add to your project.
Regards

G. N. Rao.
Hyderabad, India
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by cnavarro »

Please, look

//----------------------------------------------------------------------------//

#define CNLVER //If you comment #define CNLVER in imgtxtio.prg, you has to comment #define CNLVER in icons.c

//----------------------------------------------------------------------------//
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon tab color MICROSOFT OFFICE 2016

Post by Silvio.Falconi »

Do you inserted the New 2016 style into RibbonBar ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply