#include "FiveWin.ch"
#include "ribbon.ch"
#define CLR_BCN rgb( 105,0,129)
#define CLR_BCN2 RGB( 105,0,145 )
#define CLR_BCN3 rgb( 105,12,120)
#define CLR_MSLIGHTGRAY rgb(125,125,125)
#define CLR_MSGRAY rgb(255,255,54)
FUNCTION Main()
Local oWnd, oBar, oGr := Array(3), oBot
DEFINE WINDOW oWnd ;
TITLE "Sistema de Cuentas por cobrar";
ICON "..\icons\testtrev.ico" MDI COLOR CLR_WHITE,CLR_WHITE;
MENU HazMenu()
// Defino la barra de botones Ribbon
DEFINE RIBBONBAR oBar WINDOW oWnd PROMPT "Super Usuario","Archivos","Acerca" HEIGHT 110 TOPMARGIN 25
// Primera opcion de menu
ADD GROUP oGr[1] RIBBON oBar TO OPTION 1 PROMPT "Inicio" width 1240
@ 2,05 ADD BUTTON oBot GROUP oGr[1] BITMAP "jose1.png" ;
ROUND SIZE 50,50 TOOLTIP "Clientes " ACTION MsgInfo("Clientes")
@ 2,65 ADD BUTTON oBot GROUP oGr[1] BITMAP "jose2.png" ;
ROUND SIZE 50,50 TOOLTIP "Editar datos" ACTION MsgInfo("Editar")
@ 2,125 ADD BUTTON oBot GROUP oGr[1] BITMAP "jose3.png" ;
ROUND SIZE 50,50 TOOLTIP "Cuadrado" ACTION MsgInfo("Cuadrado")
@ 2,185 ADD BUTTON oBot GROUP oGr[1] BITMAP "jose4.png" ;
ROUND SIZE 50,50 TOOLTIP "Ventas de productos" ACTION MsgInfo("Ventas")
@ 2,265 ADD BUTTON oBot GROUP oGr[1] BITMAP "jose5.png" ;
ROUND SIZE 50,50 TOOLTIP "Salir del sistema" ACTION oWnd:End()
@ 2,745 ADD BUTTON oBot GROUP oGr[1] BITMAP "jose6.png" ;
ROUND SIZE 195,50 TOOLTIP "Datos de la empresa" ACTION MsgInfo("Empresa")
ADD GROUP oGr[2] RIBBON oBar TO OPTION 2 PROMPT "Opciones" width 1240
@ 2,05 ADD BUTTON oBot GROUP oGr[2] BITMAP "jose4.png" ;
ROUND SIZE 50,50 TOOLTIP "Clientes " ACTION MsgInfo("Clientes")
@ 2,65 ADD BUTTON oBot GROUP oGr[2] BITMAP "jose3.png" ;
ROUND SIZE 50,50 TOOLTIP "Editar datos" ACTION MsgInfo("Editar")
@ 2,125 ADD BUTTON oBot GROUP oGr[2] BITMAP "jose2.png" ;
ROUND SIZE 50,50 TOOLTIP "Cuadrado" ACTION MsgInfo("Cuadrado")
@ 2,185 ADD BUTTON oBot GROUP oGr[2] BITMAP "jose5.png" ;
ROUND SIZE 50,50 TOOLTIP "Ventas de productos" ACTION MsgInfo("Ventas")
@ 2,265 ADD BUTTON oBot GROUP oGr[2] BITMAP "jose5.png" ;
ROUND SIZE 50,50 TOOLTIP "Salir del sistema" ACTION oWnd:End()
ADD GROUP oGr[3] RIBBON oBar TO OPTION 3 PROMPT "Tercen Menu" width 1240
@ 2,05 ADD BUTTON oBot GROUP oGr[3] BITMAP "jose2.png" ;
ROUND SIZE 50,50 TOOLTIP "Clientes " ACTION MsgInfo("Clientes")
@ 2,65 ADD BUTTON oBot GROUP oGr[3] BITMAP "jose3.png" ;
ROUND SIZE 50,50 TOOLTIP "Editar datos" ACTION MsgInfo("Editar")
RibbonTheme(oBar)
ACTIVATE WINDOW oWnd MAXIMIZED
RETURN nil
//Esto es para que no muestre el menu basico de windows
STATIC FUNCTION HazMenu()
LOCAL oMenu
MENU oMenu
ENDMENU
RETURN oMenu
// Setea RibbonBar
STATIC FUNCTION RibbonTheme(oRb)
LOCAL oDlg, oGroup, oBtn
oRb:nClrPaneRB = CLR_BCN
oRb:nClrBoxOut = CLR_MSLIGHTGRAY
oRb:nClrBoxIn = CLR_BCN
oRb:nClrBoxSelOut = CLR_MSLIGHTGRAY
oRb:nClrBoxSelIn = CLR_BCN
oRb:aGrad = { { 1, CLR_WHITE, CLR_WHITE } }
oRb:aGradFld = { | nOpt | If( nOpt == oRb:nStart, { { 1, CLR_MSLIGHTGRAY, CLR_MSLIGHTGRAY } },;
{ { 1, CLR_MSLIGHTGRAY, CLR_MSLIGHTGRAY } } ) }
oRb:aGradHigh = { { 1, CLR_MSGRAY, CLR_MSLIGHTGRAY } }
oRb:aGradOver = { { 1, CLR_BCN, CLR_MSGRAY } }
AFill( oRb:aClrTabTxt, { | oSelf, nPrompt | If( nPrompt == oSelf:nOption, CLR_WHITE, CLR_WHITE ) } )
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:nHeight = 110
oGroup:nClrBoxIn = CLR_BCN2
oGroup:aGradCaption = { { 1, CLR_BCN3, CLR_BCN3 } }
oGroup:bClrText = { | lEnable | If( lEnable, CLR_MSGRAY, CLR_MSLIGHTGRAY ) }
oGroup:nClrBoxIn = CLR_BCN3
oGroup:nClrBoxOut = CLR_BCN3
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( oRb:oFont )
//oBtn:nHeight = 80
oBtn:bClrText = { || CLR_WHITE }
oBtn:bClrGradNormal = { | lPressed | If( lPressed, { { 1, CLR_BCN, CLR_BCN } },;
{ { 1, CLR_BCN2, CLR_BCN2 } } ) }
oBtn:aClrGradUnder = { || { { 1, CLR_BCN3, CLR_BCN3 } } }
oBtn:aClrGradBack = { { 1, CLR_BCN, CLR_BCN } }
oBtn:nClrBoxIn = CLR_MSGRAY
oBtn:nClrBoxOut = CLR_MSGRAY
oBtn:Refresh()
endif
next
oGroup:Refresh()
endif
next
next
RETURN nil