please test this program , is normal behavior ?
thank
Code: Select all
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
static oWnd
function Main()
DEFINE WINDOW oWnd FROM 1, 5 TO 20, 70 TITLE "Menu When" ;
MENU BuildMenu()
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "Item 1" when .F.
MENU
MENUITEM "Item 1 / SubItem 1" ACTION MsgInfo( "Why SubItem 1 is not locked if Item 1 is locked ?" ) when .T.
MENUITEM "Item 1 / SubItem 2" ACTION MsgInfo( "Locked" ) when .F.
MENUITEM "Item 1 / Subitem 3" ACTION MsgInfo( "Locked without clause 'WHEN'" )
ENDMENU
MENUITEM "End" ACTION ( MsgInfo( "End" ), oWnd:End() ) WHEN .T.
ENDMENU
return oMenu
//----------------------------------------------------------------------------//