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 Expand view
::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 Expand view
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 Expand view
hBrush2 = CreateSolidBrush( ::nClrPaneRB )
FillRect( hDCMem, aRect, hBrush2 )
I added this
- Code: Select all Expand view
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 Expand view
DrawText( hDCMem, oSelf:aPrompts[ nPrompt ], { nRow, ...
[/list]
Regards,
José Luis