Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A way to know if mouse or keyb was used in grid
Message
 
 
To
21/08/2003 18:57:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00822423
Message ID:
00822434
Views:
15
Hi Dennis,

You can put your code that update textbox into AfterRowColChange grid event. It fires every time a row or column changes.

>Hi,
>
>I have a search form class which contains a textbox and grid. I am trying to mimic the behavior found in the Index page of VFP help.
>
>Everytime I type anything in the textbox (via the KeyPress event) it seeks the concerned table to be searched and then SetFocus-es on the grid (the grid of course has as RecordSource the concerned table) and has focus back on the textbox. I am using a grid instead of a listbox (as found in Index page of VFP help) bec a listbox has a limit in terms of records it can contain (this true?).
>
>Only when the textbox KeyPress event detects a non-printable key (except home, end, backspace and space), it sets focus on the grid and allows user to move up and down the grid. Each movement updates the textbox value with the current search key.
>
>It works fine except for one thing: when the user uses the mouse to click on the grid it does not update the textbox value! IS THERE A WAY TO DETECT THIS? I have explored AMOUSEOBJ, SYS(1270) to detect if the COLUMN object is the current object over which the mouse pointer is over, but it seems to not work properly.
>
>TIA
>Dennis
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform