Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Right Click does not work in Grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00043364
Message ID:
00043410
Views:
36
>Hello all ,
>
>I am trying to use the right click menu shortcut to display an .mpr file in my grid ,
>however it won't work if i give it in the right click method of the grid.
>
>However it works in the column method of the grid.
>Does it mean that I have to give the same code of execution in all the columns of the grid. That
>would be a sad way of doing.
>
>I am sure there is some tip out there , do let me know all the experts.
>
>Ajay Sanghani
>WinSmart Solutions
>Building Software Better and Faster
>http://www.winsmart.com
>
>email : ajay@winsmart.com
Jay,

The right click event is trapped by the object that the it occurs over. In the case of a grid it is the columne or even the control within the column that will get the event.

I would suggest that you put your short cut menu code in the grid's right click event and then in the columns and the controls within the columns you put this in the rightclick;

THIS.Parent.RightClcik()

This will delegate the rightclick event to each object's parent, in the case of a control in a column the delegation is to the column and in teh column it is deleagted to teh grid. This approach keeps all of the code to manage the short cut menu in the gird's rightclick code while the rightclick event is handled by the object that it occured over.
Previous
Reply
Map
View

Click here to load this message in the networking platform