Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Shortcut Menu Location
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00674054
Message ID:
00674057
Vues:
21
Hello Kevin

move your mouse
mouse at 1,1
>I'm trying to pop up a shortcut menu. Should me a simple task, except that
>I can't seem to get it to popup where I want it.
>
>I have a button on a toolbar that calls the code below. if theres a form
>up, then the menu is in the wrong place. and I DO have the IN SCREEN
>clause. So the menu location should not be influenced by the form.
>
>The menu should pop up at the lower left corner of the toolbar button, regardless
>of where the toolbar is. If there is no form open, all works ok, but with a form
>open, it comes up in the wrong place.
>
>Here's the code:
>
>
>LPARAMETERS oMenuObj
>
>LOCAL oMenuObj, nBar, cPrompt
>
>WITH This
>
>  nRow = MROW() + 1
>  nCol = MCOL() - 7.5
>
>  ** Define the popup
>  DEFINE POPUP ShortCuts FROM nRow, nCol IN SCREEN SHORTCUT
>
>  FOR nBar = 1 TO ALEN(.aMenuInfo, 1)
>	
>    cPrompt = .aMenuInfo[nBar, 1]
>    cPicture = .aMenuInfo[nBar, 2]
>	  	
>    IF EMPTY(cPrompt)
>      DEFINE BAR nBar OF ShortCuts PROMPT "\-"
>    ELSE
>      DEFINE BAR nBar OF ShortCuts PROMPT cPrompt PICTURE cPicture
>    ENDIF
>		
>  ENDFOR
>
>  ** Define selection actions
>  ON SELECTION POPUP ShortCuts oMenuObj.MenuSelect()
>
>  ** Show the popup
>  ACTIVATE POPUP ShortCuts
>
>ENDWITH
>
>RETURN
>
Stephen McLaughlin
"Sexy Steve Valenteno", "Blastmaster"
stephenmclaughlin@gmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform