Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make popup to be at the check box
Message
 
 
À
03/01/2021 18:48:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677728
Message ID:
01677731
Vues:
51
>>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.

Antonio,

Thank you very much for explaining my possible issue. The code I used - and posted here - I use in a button of another form where it works. That is, in that other form, when a user clicks on the button, the pop-up menu shows right at the button. I can see, from your explanation that it is different with the grid. I will try different approach(s) then.
"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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform