Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rightclick menu
Message
De
23/11/2005 15:05:37
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/11/2005 03:05:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01071462
Message ID:
01071743
Vues:
28
>>>>Hi all
>>>>How can I add rightclick menu (I have a grid and I want to add rightclick menu for each cell).
>>>
>>>if you want to have one rightclick menu for all cells, then place the transparent shape over grid and use rightclick event
>>>of Shape to define popup menu and for processing of user choice.
>>
>>That way you make grid readonly :o) No way to click on it.
>
>And disable the scroll event... my users are giving me hell for this...

OTOH, the shape doesn't really have to cover the scrollbar. You can make the shape slightly shorter:
shape.width=grid.width-iif(bittest(grid.ScrollBars,1),Sysmetric(5),0)-4
Likewise, you should use headerheight+4 (or whatever is the thickness of the horizontal borders of the grid), plus sysmetric(8) to calculate the height, also adjust shape.top and shape.left, so the shape would cover cells only. You may cheat, though: make the shape opaque while you fiddle with its size and position :).

I'd still rather go with bindevents() myself. Though I didn't use the textbox's rightclick (bound to grid.myrightclick) to display a menu - I displayed a small modal form with buttons instead, simply because it's easier for me.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform