Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rightclick menu
Message
From
23/11/2005 15:05:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
23/11/2005 03:05:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01071462
Message ID:
01071743
Views:
29
>>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform