Rajesh Karunakaran
Programmer
Hi Friends,
I am trying to implement a custom menu in my program. Main reason for not using _msysmenu is that the main menu bar and its pads do not support fonts, font size, style etc even though the subsequent bars of pads and popup have font specifications.
Below is my code I am trying. The problem is it displays the menu but the moment I click anywhere outside the menu, the menu disappears and I am stuck up and foxpro wouldn't allow me to do anything.
By the way, I came across the below topic but it discusses about the _MSYSMENU which I do not want to use because of FONT issues.
That is why I created this new thread. Hope that makes sense.
What is I am missing? Can anyone help?
Thanks
Raj
I am trying to implement a custom menu in my program. Main reason for not using _msysmenu is that the main menu bar and its pads do not support fonts, font size, style etc even though the subsequent bars of pads and popup have font specifications.
Below is my code I am trying. The problem is it displays the menu but the moment I click anywhere outside the menu, the menu disappears and I am stuck up and foxpro wouldn't allow me to do anything.
Code:
_menuFontFace = 'Arial'
_menuFontSize = 9
_menuStyleChar = 'B'
SET SYSMENU TO
DEFINE MENU _mainmenu IN SCREEN FONT _menuFontFace,_menuFontSize STYLE _menuStyleChar COLOR SCHEME 3 NOMARGIN
DEFINE PAD padMasters OF _mainmenu PROMPT "Masters " FONT _menuFontFace,_menuFontSize STYLE _menuStyleChar COLOR SCHEME 1
DEFINE PAD padExit OF _mainmenu PROMPT "Exit " FONT _menuFontFace,_menuFontSize STYLE _menuStyleChar COLOR SCHEME 1
ON SELECTION PAD padMasters OF _mainmenu ACTIVATE POPUP popMasters
ON SELECTION PAD padExit OF _mainmenu do QuitMenu
*/ Masters
DEFINE POPUP popMasters
DEFINE BAR 01 OF popMasters PROMPT " Masters First" FONT _menuFontFace,_menuFontSize STYLE _menuStyleChar
DEFINE BAR 02 OF popMasters PROMPT "\-" SKIP
DEFINE BAR 03 OF popMasters PROMPT " Masters Third" FONT _menuFontFace,_menuFontSize STYLE _menuStyleChar
ON SELECTION BAR 01 OF popMasters do FORM frmMasters1 && WITH 'SAVE', ,.T. TO lRcvdValue
ON SELECTION BAR 03 OF popMasters do FORM frmMasters3 && WITH 'SAVE', ,.T. TO lRcvdValue
ACTIVATE MENU _mainmenu
READ EVENTS
*****************************
PROCEDURE QuitMenu
*****************************
CLEAR EVENTS
DEACTIVATE MENU _mainmenu
RELEASE MENUS _mainmenu EXTENDED
SET SYSMENU TO DEFAULT
By the way, I came across the below topic but it discusses about the _MSYSMENU which I do not want to use because of FONT issues.
That is why I created this new thread. Hope that makes sense.
What is I am missing? Can anyone help?
Thanks
Raj