Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DEFINE POPUP -- MULTISELECT & SHORTCUT problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00570857
Message ID:
00570968
Vues:
18
I don't have a definite answer for you but I think that shotcut menu is used when you want to expose a list of function for specific object. It goes away as soon as you make your choise by left-clicking on the item. A multiselect popup on other hand selects/deselects item on left-click. How do you propose to combine those two oposite functionalities?

>Well, that's my question in the first place. If it can't and this is by design, my next question would be, why?
>
>>My guess would be that shortcut menu cannot be multiselect, can it?
>>
>>>The following sample code works fine. However, add SHORTCUT option to the DEFINE POPUP and it doesn't. The shortcut popup appears but as soon as the mouse passes over it, whatever item the mouse is over is selected and the menu disappears. Is this by design? Is there a way to prevent this?
>>>
>>>
>>>DEFINE POPUP popFruits FROM 5,5 ;
>>>   MULTISELECT MARGIN            && Create multi-choice menu
>>>DEFINE BAR 1 OF popFruits ;
>>>   PROMPT '\<Apples'  MARK CHR(3)    && First item
>>>DEFINE BAR 2 OF popFruits ;
>>>   PROMPT '\<Bananas' MARK CHR(4)    && Second item
>>>DEFINE BAR 3 OF popFruits ;
>>>   PROMPT '\<Grapes'  MARK CHR(5) && Third item
>>>DEFINE BAR 4 OF popFruits ;
>>>   PROMPT '\<Lemons'  MARK CHR(6)    && Fourth item
>>>@ 12,5 SAY 'Your choices:'
>>>ON SELECTION POPUP popFruits DO yourchoice    && Choice routine
>>>ACTIVATE POPUP popFruits
>>>PROCEDURE yourchoice            && Executed when choice is made
>>>@ 13,5 CLEAR
>>>FOR gnCount = 1 TO CNTBAR('popFruits')      && Loop for # of items
>>>   IF MRKBAR('popFruits', gnCount) = .T.      && Option is marked,
>>>      ? PRMBAR('popFruits', gnCount) AT 5      && display caption
>>>   ENDIF
>>>NEXT
>>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform