DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 133 TOPMARGIN 25 2015
oRBar:aClrTabTxt = { { | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) } }
oRBar:nClrPaneRB = CLR_GREEN
oRBar:aGradFld = { || { { 1, CLR_WHITE, CLR_WHITE } } }
oRBar:aGradOver = { || { { 1, CLR_GREEN, CLR_GREEN } } }
#include "Fivewin.ch"
#include "Ribbon.ch"
FUNCTION MAIN()
LOCAL oWnd, oRBar, oRGrp
DEFINE WINDOW oWnd
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 133 TOPMARGIN 25 2015
oRBar:aClrTabTxt = { { | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) } }
oRBar:nClrPaneRB = CLR_GREEN
oRBar:aGradFld = { || { { 1, CLR_WHITE, CLR_WHITE } } }
oRBar:aGradOver = { || { { 1, CLR_GREEN, CLR_GREEN } } }
ADD GROUP oRGrp RIBBONBAR oRBar;
TO OPTION 1
@ 2, 2 ADD BUTTON GROUP oRGrp;
SIZE oRGrp:nWidth - 5, oRGrp:nHeight - 18
ACTIVATE WINDOW oWnd
RETURN NIL
#include "Fivewin.ch"
#include "Ribbon.ch"
FUNCTION MAIN()
LOCAL oWnd, oRBar, oRGrp, oBtn1
DEFINE WINDOW oWnd
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 133 TOPMARGIN 25 2015
oRBar:aClrTabTxt = { { | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN, CLR_WHITE ) } }
oRBar:nClrPaneRB = CLR_GREEN
oRBar:aGradFld = { || { { 1, CLR_WHITE, CLR_WHITE } } }
oRBar:aGradOver = { || { { 1, CLR_GREEN, CLR_GREEN } } }
ADD GROUP oRGrp RIBBONBAR oRBar;
TO OPTION 1
oRGrp:aGradCaption = { { 1, CLR_WHITE, CLR_WHITE } }
@ 2, 2 ADD BUTTON oBtn1 GROUP oRGrp ;
SIZE oRGrp:nWidth / 2, oRGrp:nHeight - 18
oBtn1:bClrGradNormal = { | lPressed | If( lPressed,;
{ { 1, RGB( 197, 197, 197 ), RGB( 197, 197, 197 ) } },;
{ { 1, CLR_WHITE, CLR_WHITE } } ) }
ACTIVATE WINDOW oWnd
RETURN NIL
Enrico Maria Giordano wrote:Antonio,
thank you, it works. Are the pale cyan and orange/yellow colors part of the official 2015 theme? If no, why not remove it in the class? It's annoying to do it for each group and button.
EMG
#include "Fivewin.ch"
#include "Ribbon.ch"
#define COLOR_MENUHILIGHT 29 //051,153,255
#define COLOR_MENUBAR 30 //240,240,240
FUNCTION MAIN()
LOCAL oWnd, oRBar, oRGrp, oBtn1
DEFINE WINDOW oWnd
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 163 TOPMARGIN 45 2015
oRBar:aClrTabTxt = { { | oSelf, nPrompt | If( nPrompt == oRBar:nOption, GetSysColor( COLOR_MENUHILIGHT ) , CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, GetSysColor( COLOR_MENUHILIGHT ) , CLR_WHITE ) },;
{ | oSelf, nPrompt | If( nPrompt == oRBar:nOption, GetSysColor( COLOR_MENUHILIGHT ) , CLR_WHITE ) } }
oRBar:nClrPaneRB = GetSysColor( COLOR_MENUHILIGHT )
oRBar:aGradFld = { || { { 1, CLR_WHITE, CLR_WHITE } } }
oRBar:aGradOver = { || { { 1, GetSysColor( COLOR_MENUHILIGHT ) , GetSysColor( COLOR_MENUHILIGHT ) } } }
ADD GROUP oRGrp RIBBONBAR oRBar;
TO OPTION 1
oRGrp:aGradCaption = { { 1, CLR_WHITE, CLR_WHITE } }
@ 2, 2 ADD BUTTON oBtn1 GROUP oRGrp ;
SIZE oRGrp:nWidth / 2, oRGrp:nHeight - 18 ;
action msginfo()
oBtn1:bClrGradNormal = { | lPressed | If( lPressed,;
{ { 1, RGB( 197, 197, 197 ), RGB( 197, 197, 197 ) } },;
{ { 1, CLR_WHITE, CLR_WHITE } } ) }
ACTIVATE WINDOW oWnd
RETURN NIL
Application
===========
Path and name: C:\Fuentes\TodoCuentas\zonacuentas.Exe (32 bits)
Size: 5,637,632 bytes
Compiler version: Harbour 3.2.0dev (r1703231115)
FiveWin version: FWH 17.04
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 21 secs
Error occurred at: 06/05/2017, 21:06:46
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... } length: 3
[ 2] = N 5
Stack Calls
===========
Called from: .\source\classes\TRIBBON.PRG => (b)TRIBBONBAR_PAINTFLD( 837 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:PAINTFLD( 859 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:PAINT( 675 )
Called from: .\source\classes\TRIBBON.PRG => (b)TRIBBONBAR( 158 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:DISPLAY( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1697 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:HANDLEEVENT( 1159 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
Called from: => UPDATEWINDOW( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1013 )
Called from: zonacuentas.PRG => MAIN( 434 )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 35 guests