http://code.google.com/p/fivewin-contributions/downloads/detail?name=rbdesign18.zip&can=2&q=
#include "FiveWin.ch"
#include "ribbon.ch"
function BuildRibbonBar( oWnd, _oRBar )
local oRBar, oGr1_1, oGr2_1, oBtn1_1_1, oBtn2_1_1, oBtn1_2_1
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 138 TOPMARGIN 25
ADD GROUP oGr1_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 205
@ 3, 3 ADD BUTTON oBtn1_1_1 PROMPT "new" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 POPUP TOP MENU BuildMenu1_1_1()
@ 3, 83 ADD BUTTON oBtn2_1_1 PROMPT "new" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 POPUP TOP MENU BuildMenu2_1_1()
ADD GROUP oGr2_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 203
@ 3, 3 ADD BUTTON oBtn1_2_1 PROMPT "new" GROUP oGr2_1 ACTION MsgInfo( "click" ) SIZE 80, 85 POPUP TOP MENU BuildMenu1_2_1()
return _oRBar := oRBar
static function BuildMenu1_1_1()
local oMenu
MENU oMenu POPUP
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
ENDMENU
return oMenu
static function BuildMenu2_1_1()
local oMenu
MENU oMenu POPUP
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
ENDMENU
return oMenu
static function BuildMenu1_2_1()
local oMenu
MENU oMenu POPUP
MENUITEM "one"
MENUITEM "two"
MENUITEM "three"
ENDMENU
return oMenuHello Antonio,
thank you for your work on ribbonbar designer.
I would like to ask you how you suggest to integrate the use of the designer for an existing project.
I mean would you have a ribbonbar.prg which you link with your program. Would the ribbonbar navigation be a application class or what would be best?
Thanks in advance
Otto
Otto,
My idea is to turn the RibbonBar designer functions into new Methods for the Class TRibbonBar so we can easily turn editing mode on or off from our apps ![]()
function BuildRibbonBar()
local oRBar, oGr1_1
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 134 TOPMARGIN 25
ADD GROUP oGr1_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 201 GRADIANT { { 0.06, RGB( 218, 229, 243 ), RGB( 218, 229, 103 ) }, { 0.12, RGB( 218, 229, 103 ), RGB( 218, 229, 103 ) }, { 0.24, RGB( 218, 229, 103 ), RGB( 218, 229, 168 ) }, { 0.56, RGB( 218, 229, 168 ), RGB( 255, 255, 255 ) } }
return nilFrances,
There are some required changes in some classes and also in Ribbon.ch that will be distributed with FWH 11.06.
In the meantime please comment out // GRADIANT ...
Euclides wrote:Antonio,
http://imageshack.us/photo/my-images/23/error1gr.jpg
If asking for the source, gives this error (persists several versions before)
Path and name: F:\FWH\rbdesign\rbdesign.exe (32 bits)
Size: 2,270,720 bytes
Time from start: 0 hours 0 mins 44 secs
Error occurred at: 06/10/11, 13:15:40
Error description: Error BASE/1081 Argument error: +
Args:
[ 1] = C MENUITEM "
[ 2] = U
Stack Calls
===========
Called from: .\source\classes\MENU.PRG => GENSUBMENU(424)
Called from: .\source\classes\MENU.PRG => TMENU:CGENPRG(410)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:CGENBUTTONMENUS(529)
Called from: c:\fwteam\samples\rbdesign.prg => (b)RIBBONBAROPTIONS(87)
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE(517)
Called from: c:\fwteam\samples\rbdesign.prg => RIBBONBAROPTIONS(102)
Called from: c:\fwteam\samples\rbdesign.prg => (b)SETRIBBONEDITABLE(36)
Called from: .\source\classes\WINDOW.PRG => TCONTROL:RBUTTONDOWN(1914)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:RBUTTONDOWN(1500)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1565)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:HANDLEEVENT(1172)
Called from: .\source\classes\WINDOW.PRG => _FWH(3434)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(995)
Called from: c:\fwteam\samples\rbdesign.prg => MAIN(26)
Regards, Euclides
Application
===========
Path and name: C:\fwh\samples\rbdesign.exe (32 bits)
Size: 2,270,720 bytes
Time from start: 0 hours 6 mins 17 secs
Error occurred at: 06/21/11, 17:28:04
Error description: Error BASE/1081 Argument error: +
Args:
[ 1] = C MENUITEM "
[ 2] = U
Stack Calls
===========
Called from: .\source\classes\MENU.PRG => GENSUBMENU(424)
Called from: .\source\classes\MENU.PRG => TMENU:CGENPRG(410)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:CGENBUTTONMENUS(529)
Called from: c:\fwteam\samples\rbdesign.prg => (b)RIBBONBAROPTIONS(87)
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE(517)
Called from: c:\fwteam\samples\rbdesign.prg => RIBBONBAROPTIONS(102)
Called from: c:\fwteam\samples\rbdesign.prg => (b)SETRIBBONEDITABLE(36)
Called from: .\source\classes\WINDOW.PRG => TCONTROL:RBUTTONDOWN(1914)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:RBUTTONDOWN(1500)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1565)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:HANDLEEVENT(1172)
Called from: .\source\classes\WINDOW.PRG => _FWH(3434)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(995)
Called from: c:\fwteam\samples\rbdesign.prg => MAIN(26)Hello Antonio,
how to handle "Edit prompt" - "Edit button lable" if you want 2 or 3 textlines?
Thanks in advance
Otto
Hello Antonio,
if I try to compile a saved source I get:
Error: Unresolved external '_HB_FUN_GRADIANT' referenced from C:\
Best regards,
Otto