Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Position of shortcut submenus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Titre:
Position of shortcut submenus
Divers
Thread ID:
00629180
Message ID:
00629180
Vues:
57
I am trying to design a right-click (i.e., shortcut) menu which has more than one level. That is, one of the menu bars pops up a sub-menu.

The problem is that the submenu pops up in such a way that it conceals the right side of the "parent" menu. In this example, popping up _submenu2 conceals the right-hand arrow which indicates that Bar#3 also has a submenu.
DEFINE POPUP _popShortcutMenu FROM mrow(),mcol() MARGIN RELATIVE SHORTCUT
DEFINE BAR 1 OF _popShortcutMenu PROMPT "This is Bar1"
DEFINE BAR 2 OF _popShortcutMenu PROMPT "This is Bar2"
DEFINE POPUP _submenu2 MARGIN COLOR SCHEME 4
DEFINE BAR 1 OF _submenu2 PROMPT "NestedTest1"
DEFINE BAR 2 OF _submenu2 PROMPT "NestedTest2"
DEFINE BAR 3 OF _popShortcutMenu PROMPT "This is Bar3"
DEFINE POPUP _submenu3 MARGIN COLOR SCHEME 4
DEFINE BAR 1 OF _submenu3 PROMPT "NestedTest1"
DEFINE BAR 2 OF _submenu3 PROMPT "NestedTest2"
ON BAR 2 OF _popShortcutMenu ACTIVATE POPUP _submenu2
ON BAR 3 OF _popShortcutMenu ACTIVATE POPUP _submenu3
ACTIVATE POPUP _popShortcutMenu
A non-shortcut (i.e., _MSYSMENU) submenu doesn't have this problem. It properly pop up beyond the right edge of the menu which activated it so that nothing is concealed.

Also, when there isn't room for a _MSYSMENU submenu to pop up on the right, it pops up neatly tucked against the LEFT margin of the menu that called it. In the case of a shortcut, the submenu again pops up so that it conceals a lot of the menu that called it.

FWIW, "FROM mcol()" seems to have no effect when defining the submenus. Eliminating the MARGIN argument doesn't help either.

Am I missing something? Is there a way to control where the submenu pops up or to make it consistent with the way that submenus in _MSYSMENU work?

Thanks for any help.
-Bob
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform