Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to position the bottom of the popup menu?
Message
De
11/03/2005 15:41:55
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00994983
Message ID:
00995006
Vues:
23
>>>>
>>>>yes you can with the "[TO nRow2, nColumn2]" addition to Define Popup
>>>
>>>But how do you find the values for nRow2 and nColumn2?
>>
>>they only way i know - if you want to use this you have to calculate those yourself.
>>
>>i recently did this for my toolbar. i loop through all prompts, calculate the maximum width with ThisForm.TextWidth() (remember to set the forms font properties to the menu's fornt, and later reset them). add a text margin value to this
>>
>>for the height, i count all prompts which will give you the hight (since popup works with foxels, this is the number of rows). you would then have to add some kind of "safty-catch" in case the popup will be off-screen because its to big, and limit the size for such case.
>>
>>if i remember you have to add the starting coordinated to the "to" coordinates.
>>
>>one function you might want to consider using (again because popup uses foxels and not pixels) is a function i found in the msdn help (vfp6) to convert pixels -> foxels, rather then changing ScaleMode
>>PARAMETER ;
>>	napixel, ;
>>	cdimension
>>
>>* *** usage
>>* ***	myfoxelrow = _pix2fox(pixvalnum,"V") && for vertical (row) values
>>* ***	myfoxelcol = _pix2fox(pixvalnum,"H") && for horizontal (col) values
>>
>>RETURN m.napixel/FONTMETRIC(IIF(UPPER(m.cdimension) = "H", 6, 1))
>>
>>hope this helps
>
>Thank you so much for your help.


no problem <s> , hope you get it to work. it took me a while to understand the placement logic and find a way to convert pixels to foxels without using ScaleMode.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform