Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is a shortcut menu active ?
Message
From
10/09/2002 07:20:56
 
 
To
06/09/2002 12:20:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00696530
Message ID:
00698687
Views:
11
Yuriey, Thanks for your response.
As a matter of fact my menu system is not complex at all try the following:

DEFINE POPUP p1 FROM 10,10 shortcut
DEFINE POPUP p12 SHORTCUT relative
DEFINE BAR 1 OF p1 PROMPT "bar1"
DEFINE BAR 2 OF p1 PROMPT "bar2"
ON BAR 1 OF p1 ACTIVATE POPUP p12
DEFINE BAR 1 OF p12 PROMPT "111111"
DEFINE BAR 2 OF p12 PROMPT "222222"
ACTIVATE POPUP p1

when the p1 menu is activated then activate the p12 menu by moving the bouse on the bar1 menuitem. There shouldnot be any bar of the p12 selected ... Then press Enter. You get the message :
menu specified in ACTIVATE POPUP is allready in use.
How do you solve this problem ...

Dimitris




>I do not know any universal solution for this case. But I also do not understand why I would like to know if the parent menu is activated or not. If the child menu is active and if it can be activated only thru an item on the parent menu than the fact that the child menu is active means that the parent manu is visible, isn't it?
>
>Anyways, it seems to me that you put too much complexity into your menu system if you need to know if the menu is defined and / or activated.
>
>>Thanks for the clarifications. But suppose you have a shortcut menu and by choosing a menuitem you activate a submenu. How do I know that the first shortcut menu has allready been activated and is been showed on the screen
>>
>>Dim.
>>
>>>POPUP() without parameters returns a name of active popup as a character value. Since we can have just one popup keep "focus" at a time, if POPUP() (without parameters) returs anything, then it is the name of currently active (i.e having "focus" from GUI point of view) popup. On the other hand, if you call POPUP() function with a character parameter, it return .T. if a popup whose name is specified by the parameter is defined. Getting that .T., you cannot tell in the popup is active or not. To tell this, you have to call POPUP() function without parameters abd compare its output with the popup name.
>>>


>>>>>Shortcut menu is created with DEFINE POPUP command and is activated with ACTIVATE POPUP command. So, you should be able to use POPUP() function to determine what popup is active at the moment if any and POPUP() to see if the shortcut popup is defined or not.
>>>>>
>>>>>>Is there a way to find out if a certain shortcut menu is defined and active ?
>>>>>>
>>>>>>Dimitris
>>>>
>>>>
>>>>popup() returns .t. when the popup is defined or when the popup is defined and activated, how can you differentiate if the menu is activated and not just defined ...
>>>>
>>>>Dimitris
Previous
Reply
Map
View

Click here to load this message in the networking platform