Enhanced version, Buttons menus editor:
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 oMenu
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 nil
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)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 117 guests