Ribbon Theme

Re: Ribbon Theme

Postby vilian » Thu Jun 27, 2019 12:22 pm

I think we could do this with the new user defined captions, I'm trying...
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 920
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbon Theme

Postby vilian » Thu Jun 27, 2019 9:24 pm

Antonio,
From your RBTHEME.PRG sample I'm trying to add a group with three buttons like the image bellow:

Image

But, I have no success. Could you help me ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 920
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbon Theme

Postby vilian » Fri Jun 28, 2019 12:52 am

I found out. You are fixing button's height in the function SetRibbonBarTheme. I commented and it Works!
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 920
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Ribbon Theme

Postby Silvio.Falconi » Tue Jan 14, 2020 1:56 pm

any solution for ribbon 2019 style ?
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: 6832
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon Theme

Postby TecniSoftware » Mon Sep 20, 2021 9:54 pm

I share this code to change, generate and save themes for ribbon bar.
The color schemes are saved in an .ini file that is generated with default values.
Surely the code can be improved and optimized, I hope it will be useful to you, improvements are welcome.

Retomando este viejo tema, queria compartir este codigo para cambiar, generar y guardar themes para ribbon bar.
Los esquemas de colores se guardan en un archivo .ini que se genera con valores por omisión.
Seguramente el código puede ser mejorado y optimizado, espero que les sea útil, si le introducen mejoras, bienvenidas sean.
Lo he compilado con harbour en la carpeta \samples sin problemas.

Image

Muchos saludos

Code: Select all  Expand view


#include "Ribbon.ch"
#include "xBrowse.ch"

Static cActualTheme

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

Function Main()

   local oWnd
   local oRibbon
   local oGroup

   local aDlgs
   local bAction
   local nOption
   local nWidth
   local nHeight
   local nTopMargin

   local cFont
   local nFontSize
   local cTheme
   local cIniFile

   local aBtn       := Array(10)
   local nBtnWidth
   local nBtnHeight
   local nRow, nCol

   DEFINE WINDOW oWnd TITLE "Fivewin Ribbonbar" COLOR CLR_BLACK, RGB( 223, 223, 223 )

   aDlgs        := { ' File ', ' Home ', ' Insert ', ' Design ', ' Layout ', ' References ', ' Mailings ', ' Review ', ' View ' }
   bAction      := NIL
   nOption      := NIL
   nWidth       := NIL
   nHeight      := 120 // 135
   nTopMargin   :=  40

   cFont        := "Segoe UI"
   nFontSize    := 14
   cTheme       := "RBarBlue"
   cActualTheme := cTheme
   cIniFile     := ".\xRBar.ini"

   oRibbon      := TRibbonBar():New( oWnd, aDlgs, bAction, nOption, nWidth, nHeight, nTopMargin )

   WITH OBJECT oRibbon

        :nHeightFld  := 24
        :hSeparation :=  4
        :nLeftMargin := 10

        :CalcPos()

   END





   oGroup     := oRibbon:AddGroup( 240, "Theme", 1 )
   nBtnWidth  := 60
   nBtnHeight := oGroup:nBottom - oGroup:nTop - 23
   nRow       := 5
   nCol       := 5

   // oGroup:l2010 := .T.

   @ nRow, nCol RBBTN aBtn[1];
         PROMPT "Edit()";
           SIZE nBtnWidth, nBtnHeight;
             OF oGroup;
         BORDER;
          ROUND RSIZE 3;
    TRANSPARENT;
         ACTION ( EditTheme( .F., oRibbon, cActualTheme, cIniFile ),;
                  SetRibbonTheme( oRibbon, cActualTheme, cIniFile, cFont, nFontSize ),;
                  oRibbon:Refresh( .F. ) )

   nCol += nBtnWidth + 4
   @ nRow, nCol RBBTN aBtn[2];
         PROMPT "New()";
           SIZE nBtnWidth, nBtnHeight;
             OF oGroup;
         BORDER;
          ROUND RSIZE 3;
    TRANSPARENT;
         ACTION EditTheme( .T., oRibbon,, cIniFile )

   nCol += nBtnWidth + 4
   @ nRow, nCol RBBTN aBtn[2];
         PROMPT "Select()";
           SIZE nBtnWidth, nBtnHeight;
             OF oGroup;
         BORDER;
          ROUND RSIZE 3;
    TRANSPARENT;
         ACTION SelectTheme( cIniFile, cTheme, oRibbon, @cActualTheme )






   oGroup := oRibbon:AddGroup( 260, "Font", 1 )
   oGroup := oRibbon:AddGroup( 221, "Paragraph", 1 )
   oGroup := oRibbon:addGroup( 320, "Styles", 1 )

   SetRibbonTheme( oRibbon, cTheme, cIniFile, cFont, nFontSize )

   oWnd:SetSize( 1000, 400 )

   ACTIVATE WINDOW oWnd CENTER

Return NIL

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

Function SetRibbonTheme( oRB, cTheme, cFile, cFont, nFontSize )
Local oDlg
Local oGroup
Local aTheme      := GetRBTheme( cTheme, cFile )

DEFAULT cFont     := "Segoe UI"
DEFAULT nFontSize := 14

   If EmptY( aTheme )
      MsgStop( "Theme " + cTheme + " not exist!" )
      Return NIL
   EndIf

   oRb:oFont:End()
   oRb:SetFont( TFont():New( cFont, 0, -nFontSize ) )

   oRb:nClrPaneRB    := aTheme[1]

   oRb:nClrBoxOut    := aTheme[4]
   oRb:nClrBoxIn     := aTheme[5]

   oRb:nClrBoxSelOut := aTheme[6]
   oRb:nClrBoxSelIn  := aTheme[7]

   oRb:aGrad         := { { 1, aTheme[8], aTheme[9] } }

   oRb:aGradFld      := { |nOpt| If( nOpt == oRb:nStart, { { 1, aTheme[10], aTheme[11] } }, { { 1, aTheme[12], aTheme[13] } } ) }

   oRb:aGradHigh     := { { 1, aTheme[14], aTheme[15] } }

   oRb:aGradOver     := { { 1, aTheme[16], aTheme[17] } }

   oRb:l2010         := .F.
   oRb:l2013         := .F.
   oRb:l2015         := .F.
   oRb:l2016         := .F.

   // Tabs colors
   // aFill( oRb:aClrTabTxt, { | oSelf, nPrompt | If( nPrompt == oSelf:nOption, aTheme[3], aTheme[2] ) } )
   aFill( oRb:aClrTabTxt, { | oSelf, nPrompt | If( nPrompt == oSelf:nOption, aTheme[3], If( oSelf:nOverPrompt( ScreenToClient( oRb:hWnd, GetCursorPos() )[ 1 ], ScreenToClient( oRb:hWnd, GetCursorPos() )[ 2 ] ) == nPrompt, aTheme[3], aTheme[2] ) ) } )

   DeleteObject( oRb:hBmpBrushEx )
   DeleteObject( oRb:hBrushEx )
   oRb:hBmpBrushEx := GradientBmp( oRb, oRb:nRight - oRb:nRightMargin - 3, oRb:nBottom - oRb:nTopMargin + 1, oRb:aGrad )
   oRb:hBrushEx    := CreatePatternBrush( oRb:hBmpBrushEx )

   FOR EACH oDlg IN oRb:aDialogs

       oDlg:hBack := oRb:hBrushEx
       oDlg:Refresh()

       FOR EACH oGroup IN oDlg:aControls

           If oGroup:IsKindOf( "TRBGROUP" )

              oGroup:oFont:End()
              oGroup:SetFont( TFont():New( cFont, 0, - ( nFontSize - 3 ) ) )

              oGroup:nClrTxt             := aTheme[18]

              oGroup:nClrBoxIn           := aTheme[19]
              oGroup:nClrBoxOut          := aTheme[20]

              oGroup:aGradCaption        := { { 1, aTheme[21], aTheme[22] } }
              oGroup:aGradSel            := { { 0.1, aTheme[23], aTheme[24] }, { 0.9, aTheme[25], aTheme[26] } }
              oGroup:aGradDisable        := { { 0.17, aTheme[27], aTheme[28] }, { 0.83, aTheme[29], aTheme[30] } }
              oGroup:aGradDisableCaption := { { 1, aTheme[31], aTheme[32] } }

              DeleteObject( oGroup:hBrushSel )
              DeleteObject( oGroup:hBrushUnSel )
              DeleteObject( oGroup:hBack )
              oGroup:hBrushUnSel := oDlg:hBack
              oGroup:hBack       := oDlg:hBack

              oGroup:Refresh()

           EndIf

       NEXT
   NEXT

Return NIL

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

Static Function GetRBTheme( cTheme, cFile )
Local aClr
Local uVal, n
Local cName

DEFAULT cTheme := "RBarBlue"
DEFAULT cFile  := ".\RBar.ini"

   If !File( cFile )

      aClr  := {}
      cName := "RBarBlue"

      aAdd( aClr, 10706986 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 14671839 )
      aAdd( aClr, 14671839 )
      aAdd( aClr, 12026427 )
      aAdd( aClr, 12026427 )
      aAdd( aClr, 12026427 )
      aAdd( aClr, 16777143 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 12094016 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 13677677 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )

      WriteTheme( cName, aClr, cFile )

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

      cName := "RBarDark"
      aClr  := {}

      aAdd( aClr, 2039583 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 4144959 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 4144959 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 2039583 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 4144959 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 0 )
      aAdd( aClr, 12566463 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 6250335 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )

      WriteTheme( cName, aClr, cFile )

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

      cName := "RBarGreen"
      aClr  := {}

      aAdd( aClr, 4616993 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 9698774 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 2855244 )
      aAdd( aClr, 9698774 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 2855244 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 2335595 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )

      WriteTheme( cName, aClr, cFile )

   EndIf

   aClr := {}
   n    := 0
   Do While .T.

      n++
      uVal := GetPvProfString( cTheme, StrZero( n, 2 ), "", cFile )
      If !Empty( uVal )
         aAdd( aClr, Val( uVal ) )
      Else
         EXIT
      EndIf

   EndDo

Return aClr

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

Function EditTheme( lNew, oRb, cTheme, cIniFile )
Local aTheme
Local aTemp
Local oFont
Local oDlg
Local oBrw
Local oIni
Local n

DEFAULT lNew   := .F.
DEFAULT cTheme := "RBarBlue"

   If lNew

      aTheme := GetRBTheme( "RBarBlue", cIniFile ) // A copy
      oIni   := TIni():New( cIniFile )
      aTemp  := oIni:Sections()
      cTheme := PadR( "Theme " + StrZero( Len( aTemp ) + 1, 2 ), 20 )
      If !MsgGet( "Theme name", "Theme editor", @cTheme )
         Return NIL
      EndIf
      WriteTheme( cTheme, aTheme, cIniFile )

   EndIf

   aTheme := GetRBTheme( cTheme, cIniFile )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14

   DEFINE DIALOG oDlg SIZE 370, 400 PIXEL TRUEPIXEL FONT oFont TITLE "Theme: " + cTheme

   @ 20,20 XBROWSE oBrw;
              SIZE -20,-20;
             PIXEL;
                OF oDlg ;
        DATASOURCE aTheme;
          AUTOCOLS;
           HEADERS "Colors";
               CELL LINES NOBORDER FASTEDIT

   WITH OBJECT oBrw

         WITH OBJECT :AddCol()
              :cHeader       := "Number"
              :bStrData      := {|| StrZero( oBrw:nArrayAt, 2 ) }
              :nDataStrAlign := AL_CENTER
         END

         WITH OBJECT :AddCol()
              :cHeader       := "Data"
              :bStrData      := { || DataNames()[ oBrw:nArrayAt ] }
         END

         WITH OBJECT :AddCol()
              :cHeader       := "Modify"
              :nEditType     := EDIT_BUTTON
              :bEditBlock    := { || ChangeColor( oBrw, oRb, cTheme, cIniFile ) }
         END

         :nStretchCol        := STRETCHCOL_LAST
         :bClrStd            := {|| { CLR_HRED, oBrw:aArrayData[ oBrw:nArrayAt ] } }
         :lHScroll           := .F.
         :nMarqueeStyle      := 0
         :CreateFromCode()

   END

   ACTIVATE DIALOG oDlg CENTERED NOMODAL

   RELEASE FONT oFont

Return NIL

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

Static Function ChangeColor( oBrw, oRb, cTheme, cIniFile )
Local n := oBrw:nArrayAt

  oBrw:aArrayData[n] := ChooseColor( oBrw:aArrayData[n] )

  WriteTheme( cTheme, oBrw:aArrayData, cIniFile )
  SetRibbonTheme( oRb, cTheme, cIniFile )
  oRb:Refresh( .F. )

Return NIL

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

Static Function WriteTheme( cTheme, aClr, cFile )
Local n

   FOR n := 1 TO Len( aClr )
       WritePProString( cTheme, StrZero( n, 2 ), cValToChar( aClr[n] ), cFile )
   NEXT

   SysRefresh()

Return NIL

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

Static Function DataNames()
Local aTemp := { "nClrPaneRB",;
                 "aClrTabTxt - 1",;
                 "aClrTabTxt - 2",;
                 "nClrBoxOut",;
                 "nClrBoxIn",;
                 "nClrBoxSelOut",;
                 "nClrBoxSelIn",;
                 "aGrad - 1",;
                 "aGrad - 2",;
                 "aGradFld - 1",;
                 "aGradFld - 2",;
                 "aGradFld - 3",;
                 "aGradFld - 4",;
                 "aGradHigh - 1",;
                 "aGradHigh - 2",;
                 "aGradOver - 1",;
                 "aGradOver - 2",;
                 "nClrTxt",;
                 "nClrBoxIn",;
                 "nClrBoxOut",;
                 "aGradCaption - 1",;
                 "aGradCaption - 2",;
                 "aGradSel - 1",;
                 "aGradSel - 2",;
                 "aGradSel - 3",;
                 "aGradSel - 4",;
                 "aGradDisable - 1",;
                 "aGradDisable - 2",;
                 "aGradDisable - 3",;
                 "aGradDisable - 4",;
                 "aGradDisableCaption - 1",;
                 "aGradDisableCaption - 2" }

Return aTemp

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

Function SelectTheme( cIniFile, cTheme, oRb, cActual )
local oDlg
local oIni   := TIni():New( cIniFile )
local aItems := oIni:Sections()

   DEFINE DIALOG oDlg FROM 5,10 TO 24, 55 TITLE "Select theme"

   @  1, 2 LISTBOX cTheme ITEMS aItems SIZE 145, 95 OF oDlg

   @ 7, 7 BUTTON "&OK" OF oDlg SIZE 40, 12 ;
     ACTION oDlg:End() DEFAULT

   @ 7, 17 BUTTON "&Cancel" OF oDlg SIZE 40, 12 ;
     ACTION ( cTheme := NIL, oDlg:End() )

   ACTIVATE DIALOG oDlg CENTERED

   If !Empty( cTheme )
      cActual := cTheme
      SetRibbonTheme( oRb, cTheme, cIniFile )
      oRb:Refresh( .F. )
   EndIf

Return NIL

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

 
Last edited by TecniSoftware on Tue Sep 21, 2021 2:18 pm, edited 1 time in total.
Alejandro Cebolido
Buenos Aires, Argentina
User avatar
TecniSoftware
 
Posts: 235
Joined: Fri Oct 28, 2005 6:29 pm
Location: Quilmes, Buenos Aires, Argentina

Re: Ribbon Theme

Postby Antonio Linares » Tue Sep 21, 2021 3:15 am

Alejandro,

Muchas gracias por compatirlo!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41365
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Ribbon Theme

Postby Silvio.Falconi » Wed Sep 22, 2021 2:53 pm

I noticed that the rbtn buttons are not colored according to the color of the selected style, did you think of creating a special system for the buttons too?
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: 6832
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon Theme

Postby TecniSoftware » Wed Sep 22, 2021 8:14 pm

Silvio.Falconi wrote:I noticed that the rbtn buttons are not colored according to the color of the selected style, did you think of creating a special system for the buttons too?


Updated version

Code: Select all  Expand view

#include "FiveWin.ch"
#include "Ribbon.ch"
#include "xBrowse.ch"

Static cActualTheme

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

Function Main()

   local oWnd
   local oRibbon
   local oGroup

   local aDlgs
   local bAction
   local nOption
   local nWidth
   local nHeight
   local nTopMargin

   local cFont
   local nFontSize
   local cTheme
   local cIniFile

   local aBtn       := Array(10)
   local nBtnWidth
   local nBtnHeight
   local nRow, nCol

   DEFINE WINDOW oWnd TITLE "Fivewin Ribbonbar" COLOR CLR_BLACK, RGB( 223, 223, 223 )

   aDlgs        := { ' File ', ' Home ', ' Insert ', ' Design ', ' Layout ', ' References ', ' Mailings ', ' Review ', ' View ' }
   bAction      := NIL
   nOption      := NIL
   nWidth       := NIL
   nHeight      := 120 // 135
   nTopMargin   :=  40

   cFont        := "Segoe UI"
   nFontSize    := 14
   cTheme       := "RBarBlue"
   cActualTheme := cTheme
   cIniFile     := ".\xRBar.ini"

   oRibbon      := TRibbonBar():New( oWnd, aDlgs, bAction, nOption, nWidth, nHeight, nTopMargin )

   WITH OBJECT oRibbon

        :nHeightFld  := 24
        :hSeparation :=  4
        :nLeftMargin := 10

        :CalcPos()

   END





   oGroup     := oRibbon:AddGroup( 240, "Theme", 1 )
   nBtnWidth  := 60
   nBtnHeight := oGroup:nBottom - oGroup:nTop - 23
   nRow       := 5
   nCol       := 5

   // oGroup:l2010 := .T.

   @ nRow, nCol RBBTN aBtn[1];
         PROMPT "Edit()";
           SIZE nBtnWidth, nBtnHeight;
             OF oGroup;
         BORDER;
          ROUND RSIZE 3;
    TRANSPARENT;
         ACTION ( EditTheme( .F., oRibbon, cActualTheme, cIniFile ),;
                  SetRibbonTheme( oRibbon, cActualTheme, cIniFile, cFont, nFontSize ),;
                  oRibbon:Refresh( .F. ) )

   nCol += nBtnWidth + 4
   @ nRow, nCol RBBTN aBtn[2];
         PROMPT "New()";
           SIZE nBtnWidth, nBtnHeight;
             OF oGroup;
         BORDER;
          ROUND RSIZE 3;
    TRANSPARENT;
         ACTION EditTheme( .T., oRibbon,, cIniFile )

   nCol += nBtnWidth + 4
   @ nRow, nCol RBBTN aBtn[2];
         PROMPT "Select()";
           SIZE nBtnWidth, nBtnHeight;
             OF oGroup;
         BORDER;
          ROUND RSIZE 3;
    TRANSPARENT;
         ACTION SelectTheme( cIniFile, cTheme, oRibbon, @cActualTheme )






   oGroup := oRibbon:AddGroup( 260, "Font", 1 )
   oGroup := oRibbon:AddGroup( 221, "Paragraph", 1 )
   oGroup := oRibbon:addGroup( 320, "Styles", 1 )

   SetRibbonTheme( oRibbon, cTheme, cIniFile, cFont, nFontSize )

   oWnd:SetSize( 1000, 400 )

   ACTIVATE WINDOW oWnd CENTER

Return NIL

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

Function SetRibbonTheme( oRB, cTheme, cFile, cFont, nFontSize )
Local oDlg
Local oGroup
Local oBtn
Local aTheme      := GetRBTheme( cTheme, cFile )

DEFAULT cFont     := "Segoe UI"
DEFAULT nFontSize := 14

   If EmptY( aTheme )
      MsgStop( "Theme " + cTheme + " not exist!" )
      Return NIL
   EndIf

   oRb:oFont:End()
   oRb:SetFont( TFont():New( cFont, 0, -nFontSize ) )

   oRb:nClrPaneRB    := aTheme[1]

   oRb:nClrBoxOut    := aTheme[4]
   oRb:nClrBoxIn     := aTheme[5]

   oRb:nClrBoxSelOut := aTheme[6]
   oRb:nClrBoxSelIn  := aTheme[7]

   oRb:aGrad         := { { 1, aTheme[8], aTheme[9] } }

   oRb:aGradFld      := { |nOpt| If( nOpt == oRb:nStart, { { 1, aTheme[10], aTheme[11] } }, { { 1, aTheme[12], aTheme[13] } } ) }

   oRb:aGradHigh     := { { 1, aTheme[14], aTheme[15] } }

   oRb:aGradOver     := { { 1, aTheme[16], aTheme[17] } }

   oRb:l2010         := .F.
   oRb:l2013         := .F.
   oRb:l2015         := .F.
   oRb:l2016         := .F.

   // Tabs colors
   // aFill( oRb:aClrTabTxt, { | oSelf, nPrompt | If( nPrompt == oSelf:nOption, aTheme[3], aTheme[2] ) } )
   aFill( oRb:aClrTabTxt, { | oSelf, nPrompt | If( nPrompt == oSelf:nOption, aTheme[3], If( oSelf:nOverPrompt( ScreenToClient( oRb:hWnd, GetCursorPos() )[ 1 ], ScreenToClient( oRb:hWnd, GetCursorPos() )[ 2 ] ) == nPrompt, aTheme[3], aTheme[2] ) ) } )

   DeleteObject( oRb:hBmpBrushEx )
   DeleteObject( oRb:hBrushEx )
   oRb:hBmpBrushEx := GradientBmp( oRb, oRb:nRight - oRb:nRightMargin - 3, oRb:nBottom - oRb:nTopMargin + 1, oRb:aGrad )
   oRb:hBrushEx    := CreatePatternBrush( oRb:hBmpBrushEx )

   FOR EACH oDlg IN oRb:aDialogs

       oDlg:hBack := oRb:hBrushEx
       oDlg:Refresh()

       FOR EACH oGroup IN oDlg:aControls

           If oGroup:IsKindOf( "TRBGROUP" )

              oGroup:oFont:End()
              oGroup:SetFont( TFont():New( cFont, 0, - ( nFontSize - 3 ) ) )

              oGroup:nClrTxt             := aTheme[18]

              oGroup:nClrBoxIn           := aTheme[19]
              oGroup:nClrBoxOut          := aTheme[20]

              oGroup:aGradCaption        := { { 1, aTheme[21], aTheme[22] } }
              oGroup:aGradSel            := { { 0.1, aTheme[23], aTheme[24] }, { 0.9, aTheme[25], aTheme[26] } }
              oGroup:aGradDisable        := { { 0.17, aTheme[27], aTheme[28] }, { 0.83, aTheme[29], aTheme[30] } }
              oGroup:aGradDisableCaption := { { 1, aTheme[31], aTheme[32] } }

              DeleteObject( oGroup:hBrushSel )
              DeleteObject( oGroup:hBrushUnSel )
              DeleteObject( oGroup:hBack )
              oGroup:hBrushUnSel := oDlg:hBack
              oGroup:hBack       := oDlg:hBack

              FOR EACH oBtn IN oGroup:aControls
                  If oBtn:IsKindOf( "TRBTN" )

                     oBtn:oFont:End()
                     oBtn:SetFont( TFont():New( cFont, 0, - ( nFontSize - 3 ) ) )

                     oBtn:bClrGradNormal := { | lPressed | If( lPressed, { { 1, aTheme[10], aTheme[11] } }, { { 1, aTheme[12], aTheme[13] } } ) }
                     oBtn:aClrGradBack   := oRb:aGrad
                     oBtn:nClrBoxIn      := oGroup:nClrBoxIn
                     oBtn:nClrBoxOut     := oGroup:nClrBoxOut

                     oBtn:Refresh()

                  EndIf
              NEXT
              oGroup:Refresh()

           EndIf

       NEXT
   NEXT

Return NIL

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

Static Function GetRBTheme( cTheme, cFile )
Local aClr
Local uVal, n
Local cName

DEFAULT cTheme := "RBarBlue"
DEFAULT cFile  := ".\RBar.ini"

   If !File( cFile )

      aClr  := {}
      cName := "RBarBlue"

      aAdd( aClr, 10706986 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 14671839 )
      aAdd( aClr, 14671839 )
      aAdd( aClr, 12026427 )
      aAdd( aClr, 12026427 )
      aAdd( aClr, 12026427 )
      aAdd( aClr, 16777143 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 10706986 )
      aAdd( aClr, 12094016 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 13677677 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )

      WriteTheme( cName, aClr, cFile )

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

      cName := "RBarDark"
      aClr  := {}

      aAdd( aClr, 2039583 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 4144959 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 4144959 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 2039583 )
      aAdd( aClr, 986895 )
      aAdd( aClr, 4144959 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 0 )
      aAdd( aClr, 12566463 )
      aAdd( aClr, 9408399 )
      aAdd( aClr, 6250335 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 8355711 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 11513775 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )

      WriteTheme( cName, aClr, cFile )

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

      cName := "RBarGreen"
      aClr  := {}

      aAdd( aClr, 4616993 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 9698774 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 2855244 )
      aAdd( aClr, 9698774 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 4616993 )
      aAdd( aClr, 2855244 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 0 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 2335595 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 16777215 )
      aAdd( aClr, 12632256 )
      aAdd( aClr, 12632256 )

      WriteTheme( cName, aClr, cFile )

   EndIf

   aClr := {}
   n    := 0
   Do While .T.

      n++
      uVal := GetPvProfString( cTheme, StrZero( n, 2 ), "", cFile )
      If !Empty( uVal )
         aAdd( aClr, Val( uVal ) )
      Else
         EXIT
      EndIf

   EndDo

Return aClr

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

Function EditTheme( lNew, oRb, cTheme, cIniFile )
Local aTheme
Local aTemp
Local oFont
Local oDlg
Local oBrw
Local oIni
Local n

DEFAULT lNew   := .F.
DEFAULT cTheme := "RBarBlue"

   If lNew

      aTheme := GetRBTheme( "RBarBlue", cIniFile ) // A copy
      oIni   := TIni():New( cIniFile )
      aTemp  := oIni:Sections()
      cTheme := PadR( "Theme " + StrZero( Len( aTemp ) + 1, 2 ), 20 )
      If !MsgGet( "Theme name", "Theme editor", @cTheme )
         Return NIL
      EndIf
      WriteTheme( cTheme, aTheme, cIniFile )

   EndIf

   aTheme := GetRBTheme( cTheme, cIniFile )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14

   DEFINE DIALOG oDlg SIZE 370, 400 PIXEL TRUEPIXEL FONT oFont TITLE "Theme: " + cTheme

   @ 20,20 XBROWSE oBrw;
              SIZE -20,-20;
             PIXEL;
                OF oDlg ;
        DATASOURCE aTheme;
          AUTOCOLS;
           HEADERS "Colors";
               CELL LINES NOBORDER FASTEDIT

   WITH OBJECT oBrw

         WITH OBJECT :AddCol()
              :cHeader       := "Number"
              :bStrData      := {|| StrZero( oBrw:nArrayAt, 2 ) }
              :nDataStrAlign := AL_CENTER
         END

         WITH OBJECT :AddCol()
              :cHeader       := "Data"
              :bStrData      := { || DataNames()[ oBrw:nArrayAt ] }
         END

         WITH OBJECT :AddCol()
              :cHeader       := "Modify"
              :nEditType     := EDIT_BUTTON
              :bEditBlock    := { || ChangeColor( oBrw, oRb, cTheme, cIniFile ) }
         END

         :nStretchCol        := STRETCHCOL_LAST
         :bClrStd            := {|| { CLR_HRED, oBrw:aArrayData[ oBrw:nArrayAt ] } }
         :lHScroll           := .F.
         :nMarqueeStyle      := 0
         :CreateFromCode()

   END

   ACTIVATE DIALOG oDlg CENTERED NOMODAL

   RELEASE FONT oFont

Return NIL

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

Static Function ChangeColor( oBrw, oRb, cTheme, cIniFile )
Local n := oBrw:nArrayAt

  oBrw:aArrayData[n] := ChooseColor( oBrw:aArrayData[n] )

  WriteTheme( cTheme, oBrw:aArrayData, cIniFile )
  SetRibbonTheme( oRb, cTheme, cIniFile )
  oRb:Refresh( .F. )

Return NIL

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

Static Function WriteTheme( cTheme, aClr, cFile )
Local n

   FOR n := 1 TO Len( aClr )
       WritePProString( cTheme, StrZero( n, 2 ), cValToChar( aClr[n] ), cFile )
   NEXT

   SysRefresh()

Return NIL

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

Static Function DataNames()
Local aTemp := { "nClrPaneRB",;
                 "aClrTabTxt - 1",;
                 "aClrTabTxt - 2",;
                 "nClrBoxOut",;
                 "nClrBoxIn",;
                 "nClrBoxSelOut",;
                 "nClrBoxSelIn",;
                 "aGrad - 1",;
                 "aGrad - 2",;
                 "aGradFld - 1",;
                 "aGradFld - 2",;
                 "aGradFld - 3",;
                 "aGradFld - 4",;
                 "aGradHigh - 1",;
                 "aGradHigh - 2",;
                 "aGradOver - 1",;
                 "aGradOver - 2",;
                 "nClrTxt",;
                 "nClrBoxIn",;
                 "nClrBoxOut",;
                 "aGradCaption - 1",;
                 "aGradCaption - 2",;
                 "aGradSel - 1",;
                 "aGradSel - 2",;
                 "aGradSel - 3",;
                 "aGradSel - 4",;
                 "aGradDisable - 1",;
                 "aGradDisable - 2",;
                 "aGradDisable - 3",;
                 "aGradDisable - 4",;
                 "aGradDisableCaption - 1",;
                 "aGradDisableCaption - 2" }

Return aTemp

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

Function SelectTheme( cIniFile, cTheme, oRb, cActual )
local oDlg
local oIni   := TIni():New( cIniFile )
local aItems := oIni:Sections()

   DEFINE DIALOG oDlg FROM 5,10 TO 24, 55 TITLE "Select theme"

   @  1, 2 LISTBOX cTheme ITEMS aItems SIZE 145, 95 OF oDlg

   @ 7, 7 BUTTON "&OK" OF oDlg SIZE 40, 12 ;
     ACTION oDlg:End() DEFAULT

   @ 7, 17 BUTTON "&Cancel" OF oDlg SIZE 40, 12 ;
     ACTION ( cTheme := NIL, oDlg:End() )

   ACTIVATE DIALOG oDlg CENTERED

   If !Empty( cTheme )
      cActual := cTheme
      SetRibbonTheme( oRb, cTheme, cIniFile )
      oRb:Refresh( .F. )
   EndIf

Return NIL

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

 
Last edited by TecniSoftware on Thu Sep 23, 2021 2:21 pm, edited 1 time in total.
Alejandro Cebolido
Buenos Aires, Argentina
User avatar
TecniSoftware
 
Posts: 235
Joined: Fri Oct 28, 2005 6:29 pm
Location: Quilmes, Buenos Aires, Argentina

Re: Ribbon Theme

Postby Silvio.Falconi » Thu Sep 23, 2021 11:05 am

Nice job
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: 6832
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon Theme

Postby Silvio.Falconi » Sat Sep 25, 2021 10:29 am

It could be interesting to insert the possibility to change the style, I mean
l2007
l2013
l2015
l2016
and the style of the tab if rounded or square like office 2013/2019
and use the method

Code: Select all  Expand view
METHOD SetStyles( l2010, l2013, l2015, nTopMargin, nClrPaneRB, nClrBoxOut, nClrBoxIn,;
            nClrBoxSelOut, nClrBoxSelIn, aGrad, aGradFld, aGradHigh, aGradOver, l2016 ) CLASS TRibbonBar
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: 6832
Joined: Thu Oct 18, 2012 7:17 pm

Re: Ribbon Theme

Postby Jilo1234 » Mon Dec 26, 2022 10:52 pm

Hello Fivewin Community,

There is a question about Menu bar
This is the code:
Code: Select all  Expand view


#Include "FiveWin.ch"

#define CLR_MSPURPLE RGB( 0,  120, 215 )
#define CLR_MSRED    RGB( 232,  17,  35 )
#define CLR_MSGRAY   RGB( 229, 229, 229 )

STATIC oFontMenu, oFont, oWnd

FUNCTION Main()

   LOCAL oImage
   LOCAL ScreenWidth := GetSysMetrics(0), ScreenHeight := GetSysMetrics(1)
   LOCAL cFont  := "Tahoma"
   LOCAL cFontH := -14
   LOCAL oBar

   DEFINE FONT oFontMenu NAME cFont SIZE 0, cFontH WEIGHT 300
   DEFINE FONT oFont     NAME cFont SIZE 0, cFontH - 2 // WEIGHT 300

   DEFINE WINDOW oWnd STYLE WS_POPUP FROM 0, 0 TO ScreenHeight, ScreenWidth ;
      PIXEL NOSYSMENU NOICONIZE COLOR CLR_RED,CLR_RED                                            ;
      MENU MyMenu()

   DEFINE BUTTONBAR oBar LEFT SIZE 100,100 COLOR RGB(1,1,1) NOBORDER OF oWnd FLAT

   oImage := TImage():Define( , "..\BITMAPS\brush1.bmp", oWnd )

   //oWnd:bPainted := {|hDC| PalBmpDraw( hDC, 0, 0, oImage:hBitmap, oImage:hPalette, ScreenWidth, ScreenHeight, , .T., Chr(0) ) }

   oWnd:SetFont( oFont )
   oWnd:Center()

   ACTIVATE WINDOW oWnd MAXIMIZED

RETURN NIL

FUNCTION MyMenu()

   LOCAL oMenu

   MENU oMenu HEIGHT -4.8 FLAT COLORMENU RGB(1,1,1), CLR_MSPURPLE ;
      COLORLINEBOTTOM RGB(1,1,1) FONT oFontMenu NOBORDER // 2013

      MENUITEM "&Archivos"
      MENU FLAT NOBORDER
         MENUITEM "&Clientes"                                //  ACTION Clientes(user)
         MENUITEM "&Proveedores"                             //  ACTION Proveed()
         MENUITEM "&Stocks"                                  //  ACTION  Stock()
         MENUITEM "&Componentes"                             //  ACTION  iStock()
         MENUITEM "&Cuentas Corrientes por Cliente"          //  ACTION  CtacteT()
         MENUITEM "&Vendedores"                              //  ACTION  Vendedor()
         MENUITEM "&Comprobantes Emitidos"                   //  ACTION  Facremit()
         MENUITEM "&Cobranzas"                               //  ACTION  Vfacrem()
         MENUITEM "&Recibos"                                 //  ACTION  Recibo1()
         MENUITEM "&Transporte"                              //  ACTION  Tra()
         MENUITEM "&Generar Etiquetas Precios y Cod. Barr."  //  ACTION  mainprub()
         MENUITEM "&Generar Etiquetas Precios y Cod. Barr."  //  ACTION  pruebax()
      ENDMENU

      MENUITEM "&Ventas"
      MENU
         MENUITEM  oemtoansi("&Facturaci¢n")         //  Action (xtipo:= "factura",GRID())
         MENUITEM  oemtoansi("&Facturaci¢n PRUEBA")  //  Action (xtipo:= "factura",SBARRAY())
         MENUITEM  oemtoansi("&Remitos")             //  Action ( xtipo:= "remito",RGRID())
         MENUITEM  oemtoansi("&Pedidos")             //  Action (xtipo:= "pedido",PGRID())
      ENDMENU

      MENUITEM "&Compras"
      MENU
         MENUITEM  oemtoansi("&Compras")                                   //  Action cGRID()
         MENUITEM  oemtoansi("&Consultas Compras x Proveedores Facturas")  //  Action ( compras() )
         MENUITEM  oemtoansi("&Consultas Compras x Proveedores Totales ")  //  Action ( comprasp() )
         MENUITEM  oemtoansi("&Cuentas Corrientes  Proveedores")           //  Action ( CTACTET1() )
      ENDMENU

      MENUITEM "Caja"
      MENU
         MENUITEM "&Caja"                 //  ACTION  Caja()
         MENUITEM "Tarjetas de &credito"  //  ACTION  TARJETA()
      ENDMENU

      MENUITEM "Cheques"
      MENU
         MENUITEM "C&heques"                 //  ACTION  CHEQUE()
         MENUITEM "Vencimietos de C&heques"  //  ACTION  cCHEck()
      ENDMENU

      MENUITEM "Bancos"
      MENU
         MENUITEM "&Cuentas "                //  ACTION  CUENTAS()
         MENUITEM "&Movimientos Bancarios "  //  ACTION  Movban()
         MENUITEM "&Cuentas/Saldos "         //  ACTION  Salban()
         MENUITEM "&Importar desde Excel "   //  action   (rBancosS(),impoexcel1c())
      ENDMENU

      MENUITEM "&Libros IVA"
      MENU
         MENUITEM "&IVA Ventas"                                           //  ACTION  livav()
         MENUITEM "&Exportar a Regimen Informacion Ventas Comprobantes"   //  ACTION  CITIVC()
         MENUITEM "&Exportar a Regimen Informacion Ventas Alicuotas"      //  ACTION  CITIVCA()
         MENUITEM  oemtoansi("&IVA Compras")                              //  Action livac()
         MENUITEM "&Exportar a Regimen Informacion Compras Comprobantes"  //  ACTION  CITICC()
         MENUITEM "&Exportar a Regimen Informacion Compras Alicuotas"     //  ACTION  CITICCA()
      ENDMENU

      MENUITEM "&Informes y Estadisticas"
      MENU
         MENUITEM "&Ventas Diarias y Mensuales"                                         //  action Vdym()
         *MENUITEM "&Ventas Diarias y Mensuales por horario"                            //  *action Vdymh()
         MENUITEM "&Ventas Diarias y Mensuales Por Rubro"                               //  action Vdym2()
         MENUITEM "&Ventas Diarias y Mensuales Por Vendedor"                            //  action Vdymv()
         MENUITEM "&Presupuestos / Pedidos  Diarios y Mensuales Por Cliente detallada"  //  action Vdyp()
         MENUITEM "&Presupuestos / Pedidos diarios y mensuales"                         //  action Vdymp()
         MENUITEM "&Listado de  Precios 1 "                                             //  action  (repLPRE(),lstoc())
         MENUITEM "&Listado de  Precios 2 "                                             //  action  (repLPRE(),lstoc1())
         MENUITEM "&Listado de  Precios 3 "                                             //  action  (repLPRE(),lstoc2())
         MENUITEM "&Listado de  Precios 4 "                                             //  action  (repLPRE(),lstoc3())
      ENDMENU

      MENUITEM OEMTOANSI("Configuraci¢n")
      MENU
         MENUITEM "&Empresa"                       //         ACTION  empresa()
         MENUITEM "&Back Up de Archivos"           //         ACTION  czip()
         MENUITEM "&Restaurar Archivos"            //         ACTION  dzip()
         MENUITEM "&Numeracion de Comprobantes"    //         ACTION  talonar()
         MENUITEM "&Rubros"                        //         ACTION  Rubro()
         MENUITEM "&Rubros Compras"                //         ACTION  Rubroc()
         MENUITEM "&Cotizacion Monedas"            //         ACTION  Cotiz()
         MENUITEM "&Usuarios"                      //         ACTION  User()
         MENUITEM "&Reorganizacion de archivos"    //         ACTION  Indexa()
         MENUITEM "&Modificacion de Codigo Stock"  //         ACTION  Mstock()
         MENUITEM "&Texto"                         //         ACTION  clausula()
         MENUITEM "&Datos Conexion"                //         ACTION  Dconex()
         MENUITEM "&Aumento de Precios"            //         ACTION  Aumento()
      ENDMENU

      MENUITEM "&Salir"  ACTION ( oWnd:End() )
      MENUITEM ""  
      MENUITEM ""
      MENUITEM ""
      MENUITEM ""
      MENUITEM ""  
      MENUITEM ""
      MENUITEM ""
      MENUITEM ""
//      MENUITEM "-" //FONT oFont
//      MENUITEM "x" //FONT oFont

   ENDMENU

RETURN( oMenu )


 
 


And i want to delete( or not show ) the gray border in the Menu.

Image
[img]https://postimg.cc/gXPSRNQg[img]

Is there an option to do it?

Regards.
Jilo1234
 
Posts: 7
Joined: Sat Jan 28, 2017 5:08 am

Re: Ribbon Theme

Postby James Bott » Fri Jan 06, 2023 2:35 am

Jilo1234,

Is there an option to do it?

I don't think so as this is standard windows app behavior.

Actually, I looked at several windows apps and they all have two color bars (single pixel high) at the bottom of the button bar--kind of a gradient. You will have to look hard to see this. I use a free magnifying program called Colorpix, just Google for it.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Ribbon Theme

Postby CARLOS ATUNCAR » Sun Jul 30, 2023 5:59 pm

Saludos una consulta como cambiar el color de la cinta del QUICKBUTTON al mismo todo del estilo oscuro.


Gracias

https://1drv.ms/i/s!AvkdciTlQAtA-kusSoSUmDmzA7kF?e=9baq9F
CARLOS ATUNCAR
 
Posts: 118
Joined: Thu Sep 17, 2015 11:40 pm

Re: Ribbon Theme

Postby Antonio Linares » Mon Jul 31, 2023 4:56 am

Estimado Carlos,

Por favor copia el código aqui que estás usando para crear la ribbonbar
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41365
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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