Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding ScaleMode and control coordinates
Message
From
15/09/2008 14:35:18
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
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:
01347725
Views:
17
>Hi Dmitry,
>
>>How can I change the way the button coordinates are determined to make sure that the popup menu moves with the button?
>
>For the simple case of a container, you can add the top and left coordinates. As a generic solution that also works inside a pageframe use:
>
>	Local lnRow, lnColumn, lcName, loPos
>	lcName = Sys(2015)
>	Thisform.AddObject( m.lcName, "Commandbutton" )
>	loPos = GetPem( Thisform, m.lcName )
>	loPos.Move( Objtoclient(This,2), Objtoclient(This,1), This.Width, This.Height )
>	Thisform.ScaleMode = 0
>	lnRow = loPos.Top + loPos.Height
>	lnColumn = loPos.Left
>	Thisform.ScaleMode = 3
>	Thisform.RemoveObject( m.lcName )
>
I like your style... this is exactly what I would end doing if I had to sit and think about it. Nice use of default invisibility - usually it's a nuisance that you need to remember to pop an object visible after creating it, but this actually makes it like magic, as if sending the invisible man to measure the room while having guests at dinner. Nobody notices a thing :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform