I deleted previous link
Please try this and rename to .exe
https://bitbucket.org/fivetech/fivewin- ... rizon2.ex1
cnavarro wrote:I deleted previous link
Please try this and rename to .exe
https://bitbucket.org/fivetech/fivewin- ... rizon2.ex1
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd MENU BuildMenu()
ACTIVATE WINDOW oWnd
return nil
//---------------------------------------------------------------------------------------------------------//
function BuildMenu()
local oMenu,nhh,baction
MENU oMenu
MENUITEM "First"
MENU
For nhh= 1 to 4
baction:= GenBlock_Faiz(nhh)
MENUITEM "function number "+ltrim(str(nhh)) BLOCK baction
next
ENDMENU
ENDMENU
return oMenu
//---------------------------------------------------------------------------------------------------------//
FUNCTION GenBlock_Faiz(nhh)
LOCAL cProc := "Faiz"+ALLTRIM(STR(nhh))
RETURN {|| &(cProc)() }
//---------------------------------------------------------------------------------------------------------//
Function Faiz4()
return Msginfo("run 4")
Function Faiz3()
return Msginfo("run 3")
Function Faiz2()
return Msginfo("run 2")
Function Faiz1()
return Msginfo("run 1")
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd MENU BuildMenu()
ACTIVATE WINDOW oWnd ;
ON CLICK ShowPopup( nRow, nCol,oWnd )
return nil
function ShowPopup( nRow, nCol,oWnd)
local oPop
MENU oPop POPUP
MENUITEM "Menu popup "
MENU
For nhh= 1 to 4
baction:= GenBlock_Faiz(nhh)
MENUITEM "function number "+ltrim(str(nhh)) BLOCK baction
next
ENDMENU
ENDMENU
ACTIVATE POPUP oPop AT nRow, nCol OF oWnd
return nil
//---------------------------------------------------------------------------------------------------------//
FUNCTION GenBlock_Faiz(nhh)
LOCAL cProc := "Faiz"+ALLTRIM(STR(nhh))
RETURN {|| &(cProc)() }
//---------------------------------------------------------------------------------------------------------//
Function Faiz4()
return Msginfo("run 4")
Function Faiz3()
return Msginfo("run 3")
Function Faiz2()
return Msginfo("run 2")
Function Faiz1()
return Msginfo("run 1")
cnavarro wrote:Dear Hakan, why?
Please send me a mail to navarro [ dot ] cristobal [ arroba ] gmail [ dot ] com
cnavarro wrote:Hakan, your mail It was in the span folder and I hadn't seen it
I am seeing how I can send the executable to you
#include "fivewin.ch"
#include "ribbon.ch"
function main()
local oRBar
local oWnd, oMenu
DEFINE WINDOW oWnd TITLE "RibbonBar Test " + FWVERSION from 1,1 to 600,600 pixel //brush oBrush1
Define_RIBBON(oWnd)
SET MESSAGE OF oWnd TO "Testing FWH own Class RibbonBar" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd MAXIMIZED
oRBar:End()
return nil
PROCEDURE Define_RIBBON(oWnd)
LOCAL oFaizMenu, oTopluRap, oYetkiVerme
LOCAL oRBar, oGrp11
MENU oFaizMenu POPUP 2007
MENUITEM "test" BLOCK { || MsgInfo( "Hello" ) }
ENDMENU
DEFINE RIBBONBAR oRBar WINDOW oWnd ;
PROMPT "Option 1","Option 2","Option 3" ;
HEIGHT 133 TOPMARGIN 25
oRBar:nLeftMargin := 75
oRBar:CalcPos()
ADD GROUP oGrp11 RIBBON oRBar TO OPTION 1 PROMPT "" WIDTH 200
@ 3, 3 ADD BUTTON oBtn GROUP oGrp11 ;
SIZE 70, 70 PROMPT "Faiz" ;
MENU oFaizMenu POPUP
RETURN
#Include "FiveWin.ch"
#Include "Ribbon.ch"
STATIC oWnd
FUNCTION Main()
LOCAL oRBar
LOCAL oMenu
DEFINE WINDOW oWnd TITLE "RibbonBar Test " + FWVERSION
// Define_RIBBON( oWnd )
SET MESSAGE OF oWnd TO "Testing FWH own Class RibbonBar" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd MAXIMIZED ON INIT( Define_RIBBON( oWnd ) )
oRBar:End()
RETURN NIL
PROCEDURE Define_RIBBON(oWnd)
LOCAL oFaizMenu, oTopluRap, oYetkiVerme
LOCAL oRBar, oGrp11, oBtn
MENU oFaizMenu POPUP 2007
MENUITEM "test" BLOCK { || MsgInfo( "Hello" ) }
ENDMENU
DEFINE RIBBONBAR oRBar WINDOW oWnd ;
PROMPT "Option 1","Option 2","Option 3" ;
HEIGHT 133 TOPMARGIN 25
oRBar:nLeftMargin := 75
oRBar:CalcPos()
ADD GROUP oGrp11 RIBBON oRBar TO OPTION 1 PROMPT "" WIDTH 200
@ 3, 3 ADD BUTTON oBtn GROUP oGrp11 ;
SIZE 70, 70 PROMPT "Faiz" ;
MENU oFaizMenu POPUP
RETURN( oFaizMenu )
// FIN
karinha wrote:Hello, in this modified example, what should he do?
- Code: Select all Expand view RUN
#Include "FiveWin.ch"
#Include "Ribbon.ch"
STATIC oWnd
FUNCTION Main()
LOCAL oRBar
LOCAL oMenu
DEFINE WINDOW oWnd TITLE "RibbonBar Test " + FWVERSION
// Define_RIBBON( oWnd )
SET MESSAGE OF oWnd TO "Testing FWH own Class RibbonBar" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd MAXIMIZED ON INIT( Define_RIBBON( oWnd ) )
oRBar:End()
RETURN NIL
PROCEDURE Define_RIBBON(oWnd)
LOCAL oFaizMenu, oTopluRap, oYetkiVerme
LOCAL oRBar, oGrp11, oBtn
MENU oFaizMenu POPUP 2007
MENUITEM "test" BLOCK { || MsgInfo( "Hello" ) }
ENDMENU
DEFINE RIBBONBAR oRBar WINDOW oWnd ;
PROMPT "Option 1","Option 2","Option 3" ;
HEIGHT 133 TOPMARGIN 25
oRBar:nLeftMargin := 75
oRBar:CalcPos()
ADD GROUP oGrp11 RIBBON oRBar TO OPTION 1 PROMPT "" WIDTH 200
@ 3, 3 ADD BUTTON oBtn GROUP oGrp11 ;
SIZE 70, 70 PROMPT "Faiz" ;
MENU oFaizMenu POPUP
RETURN( oFaizMenu )
// FIN
Regards.
#include "FiveWin.ch"
#Include "Ribbon.ch"
STATIC oWnd
STATIC lLook := .T.
FUNCTION Main()
LOCAL oRBar
LOCAL oMenu
DEFINE WINDOW oWnd TITLE "RibbonBar Test " + FWVERSION
// Define_RIBBON( oWnd )
SET MESSAGE OF oWnd TO "Testing FWH own Class RibbonBar" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd MAXIMIZED ON INIT( Define_RIBBON( oWnd ) )
oRBar:End()
RETURN NIL
PROCEDURE Define_RIBBON(oWnd)
LOCAL oFaizMenu, oTopluRap, oYetkiVerme
LOCAL oRBar, oGrp11, oBtn
MENU oFaizMenu POPUP 2007
MENUITEM "Test Vision" BLOCK { || MsgInfo( "Hello" ), lLook := .F. } ;
WHEN( lLook )
ENDMENU
DEFINE RIBBONBAR oRBar WINDOW oWnd ;
PROMPT "Option 1","Option 2","Option 3" ;
HEIGHT 133 TOPMARGIN 25
oRBar:nLeftMargin := 75
oRBar:CalcPos()
ADD GROUP oGrp11 RIBBON oRBar TO OPTION 1 PROMPT "" WIDTH 200
@ 3, 3 ADD BUTTON oBtn GROUP oGrp11 ;
SIZE 70, 70 PROMPT "Faiz" ;
MENU oFaizMenu POPUP
RETURN( oFaizMenu )
// FIN / END
Horizon wrote:Hi,
- Code: Select all Expand view RUN
#include "fivewin.ch"
#include "ribbon.ch"
function main()
local oRBar
local oWnd, oMenu
DEFINE WINDOW oWnd TITLE "RibbonBar Test " + FWVERSION from 1,1 to 600,600 pixel //brush oBrush1
Define_RIBBON(oWnd)
SET MESSAGE OF oWnd TO "Testing FWH own Class RibbonBar" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd MAXIMIZED
oRBar:End()
return nil
PROCEDURE Define_RIBBON(oWnd)
LOCAL oFaizMenu, oTopluRap, oYetkiVerme
LOCAL oRBar, oGrp11
MENU oFaizMenu POPUP 2007
MENUITEM "test" BLOCK { || MsgInfo( "Hello" ) }
ENDMENU
DEFINE RIBBONBAR oRBar WINDOW oWnd ;
PROMPT "Option 1","Option 2","Option 3" ;
HEIGHT 133 TOPMARGIN 25
oRBar:nLeftMargin := 75
oRBar:CalcPos()
ADD GROUP oGrp11 RIBBON oRBar TO OPTION 1 PROMPT "" WIDTH 200
@ 3, 3 ADD BUTTON oBtn GROUP oGrp11 ;
SIZE 70, 70 PROMPT "Faiz" ;
MENU oFaizMenu POPUP
RETURN
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Maurizio and 56 guests