Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding ScaleMode and control coordinates
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Understanding ScaleMode and control coordinates
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01347419
Message ID:
01347419
Vues:
60
Hi,

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.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform