Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Manik Chamara
  Where is Manik Chamara?
 Mawanella
 Sri Lanka
 Manik Chamara
 Tags
Subject: RE: Merge popup menus
Thread ID: 310941 Message ID: 310944 # Views: 53 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: VFP and .NET
Date: Monday, June 27, 2011 11:57:05 AM         
   


> i created two different context menus.Then i want to know how to merge these
> two pop ups in to a single? please kindly reply.tnx.


Since context menus are a sequence of Define Popup / Bar and On Selection commands, you'd just need to split the code:
One method Defines the popup, calls methodB() and methodC() and then Activates the popup.
In methodB() and in methodC(), you'd define the Bars and the On Selection commands.


* method A:
DEFINE POPUP sc SHORTCUT RELATIVE FROM MROW(),MCOL()
This.MethodB()
This.MethodC()
ACTIVATE POPUP sc
Return

* method B:
DEFINE BAR 1 OF sc PROMPT "SubMenu"
ON BAR 1 OF sc ACTIVATE POPUP sc2
Return

* method C
DEFINE POPUP sc2 SHORTCUT RELATIVE
DEFINE BAR 1 OF sc2 PROMPT (TRIM(temp.col1))
ON SELECTION BAR 1 OF sc2 Messagebox(temp.col2)
Return




hth
-Stefan

ENTIRE THREAD

Merge popup menus Posted by Manik Chamara @ 6/27/2011 11:45:40 AM
RE: Merge popup menus Posted by Stefan Wuebbe @ 6/27/2011 11:57:05 AM