Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I'm Stumped
Message
 
To
28/07/1999 09:12:41
Lee Baker
Home Depot Television
Atlanta, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00247078
Message ID:
00247136
Views:
21
>I have grid on a form that is showing several line items as part of a relation. I also have a rightclick event that pops up a menu with Add/Edit/Delete. However, I cannot figure out how to activate this popup if I rightclick anywhere on a row that has data. Works perfect on empty rows. I've looked at the TasTrade orderentry.scx, but I must be missing something. Any assistance would be appreciated.

Lee,

The event of the control under the mouse will fire. When the row has data the control under the mouse is the control in the column. The OO way to deal with this is delegation. Put your code where you have it now, in the grid's rightclick. Then in each control in a column put this in the rightclick;

This.Parent.RightClick()

Then in each column's rightclick put this;

This.Parent.RightClick()

This approach leaves your menu code in only one place and allows you to add specialized code to any of the controls or columns and still get your menu.
Previous
Reply
Map
View

Click here to load this message in the networking platform