Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make popup to be at the check box
Message
From
03/01/2021 18:48:18
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677728
Message ID:
01677730
Views:
72
>Hi,
>
>I have a check box in one of the columns of a grid. The check box appears as a button (be design). I want a pop-up menu appear when user clicks on a check box image. But the pop-up always appears in the upper-left corner of the form where grid resides. This is the code inside the Click method of the the check box:
>
>	LOCAL lnPosX, lnPosY, selmenu, OutputChoice
>
>	Thisform.ScaleMode = 0		     && Foxels
>	lnPosX = This.Left 
>	lnPosY = This.Top  
>	Thisform.ScaleMode = 3             && Back to Pixels
>
>	selmenu = 0
>
>	define popup OutputChoice shortcut relative from (lnPosY),(lnPosX)
>	on selection popup OutputChoice selmenu = 1
>	define bar 1 of OutputChoice prompt "Preview Work Order"
>	define bar 2 of OutputChoice prompt "Print Work Order  "
>	
>	activate popup OutputChoice
>
>
>What am I missing? How do I make this pop-up to be right at the check box image?
>
>TIA

Dmitry,
	Thisform.ScaleMode = 0		     && Foxels
	lnPosX = This.Left 
	lnPosY = This.Top  
	Thisform.ScaleMode = 3             && Back to Pixels
This normally will always be zero: it's the position of the checkbox relative to its container. So, you have to go up in the container hierarchy to find out the real position of the checkbox. This must include all (visible) rows and columns and other graphical elements of the grid (delete marks, record marks, ...). If the grid is inside a pageframe, then that must also be taken in consideration.
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform