Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to code MouseDown event of Grid Control
Message
From
29/07/2010 10:16:29
Scott Butts
Ims Specialty Services
Twin Falls, Idaho, United States
 
 
To
29/07/2010 10:00:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01474450
Message ID:
01474453
Views:
27
>The only place on the grid that detects a click is the upper-left hand corner. You need to capture the click in the control that's inside the column, typically a textbox.

That is what I am doing, the event fires correctly and I can detect left, right and any keys pressed, the problem is the focus and the grid being rebuilt.

>
>>Is there a proper way to code the MouseDown event? What I mean is, when coding a MouseDown event is there required calls to NODEFAULT or DODEFAULT so that the events are no short circuited.
>>
>>The reason I had to code the MouseDown event is becuase I want to display one menu for a riight click and another menu for an ALT right click. The problem I am having is if a user right clicks in the grid and does NOT select an option, just clicks off on another form, focus is not moved from the grid cell and when the grids refresh timer fires again (I am using a custom text field in the grid to pass mousedown, click, double click etc to the parent grid object because the grid is rebuilt with the timer) I am not able to issue my Addobject command, it errors with "an object with that name already exist". If I look in the debugs call stack I do NOT see that it is running any code in the grid, I just see Main.prg and the timer.
>>
>>I hope I have explaind the situation and look forward to any and all input. Thanks for any help.
>>
>>Scott
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform