I'm having a problem with RibbonBar and last FWH version. I made a little sample to show this(Pls see code bellow). IF I click on the menu of Test1 button and choose the option, Create1() is run twice. Do you know why ?
- Code: Select all Expand view
#include "FiveWin.ch"
#INCLUDE "ribbon.CH"
static oWnd, oRb
function Main()
DEFINE WINDOW oWnd FROM 1, 1 To 42, 105 ;
TITLE "This is a MDI enviroment" MDI VSCROLL
oWnd:oMenu:End()
oWnd:bInit := {|| ribbon_menu() }
ACTIVATE WINDOW oWnd
return nil
FUNCTION Ribbon_Menu()
local oGr1, oMnu
local oBtn
oRb := TRibbonBar():New(oWnd, {"Folder 1"}, ,, oWnd:nWidth, 125, 26 )
oRb:nLeftMargin = 5
oRb:CalcPos()
ADD GROUP oGr1 RIBBON oRB TO OPTION 1 PROMPT "Group1" WIDTH 140
MENU oMnu POPUP 2007
MenuAddItem("Test 1","Test 1",.F.,,,,,,{|| Create1()},,,.F.,,,.F.,.F.,.f. )
ENDMENU
@ 5,5 ADD BUTTON oBtn PROMPT "Window 1" BITMAP "" GROUP oGr1 POPUP MENU oMnu ROUND SIZE 63,65
SetWndDefault( oRb )
return nil
function Create1()
local oWndChild
DEFINE WINDOW oWndChild MDICHILD OF oWnd
ACTIVATE WINDOW oWndChild
return nil