Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's Wrong Here?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00560298
Message ID:
00560300
Vues:
21
The problem is that form's demensions and coordinates usually are in pixels not charachters. See form's ScaleMode property. I guess, you can use FONTMETRIC( ) function to convert pixels to characters.

>I have a container with a button on it. When I click the button, I want
>to pop up a shortcut menu. The menu pops up, but WAY off the the right
>and WAY below the form.
>
>
>
>** Within the container
>WITH This
>
>  ** Define top, left position
>  nRow = ThisForm.Top + .Top + .tbnPopup.Height
>  nCol = ThisForm.Left + .Left
>
>  ** Create popup
>  DEFINE POPUP PopItems FROM nRow, nCol SHORTCUT
>
>  ** Add the menu bars
>  FOR nItem = 1 TO ALEN(aValues, 1)
>
>    DEFINE BAR nItem OF PopItems PROMPT aValues[nItem, 2]
>
>  ENDFOR
>
>  ** Define selection actions
>  ON SELECTION POPUP PopItems oContainer.SelectItem()
>
>  ** Show the popup
>  ACTIVATE POPUP PopItems
>
>ENDWITH
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform