Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding ScaleMode and control coordinates
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01347419
Message ID:
01347437
Views:
21
Check Pixels and Foxels

>
>Some time ago I got a good suggestion on how to display a popup menu right above a button. The coordinates for the button position were determined as following:
>
>
>Thisform.ScaleMode = 0		&& Foxels
>lnPosX = This.Left 
>lnPosY = This.Top 
>Thisform.ScaleMode = 3                        && Back to Pixels
>
>define popup MyPopupMenu shortcut relative from (lnPosY), (lnPosX)
>
>
>The above worked very well.
>
>Until I changed the position of the container on which the button reside. Here is more detailed explanation. The button at which I want to pop a menu is on a container. The container is on on one of the pages of the pageframe. What I did is in the INIT method of the form I dynamically increased the form and moved the pageframe down (by changing the TOP property value of the pageframe). All containers and controls on the pageframe moved accordinigly, no problem. But the coordinate of the button (as determined above) didn't change. That is, when user clicks on the button the popup menu appears much higher than the button. That is, the popup menu appears in the position where the button would have been had I not moved the pageframe down.
>
>How can I change the way the button coordinates are determined to make sure that the popup menu moves with the button?
>
>Thank you in advance for any suggestions.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform