Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A way to know if mouse or keyb was used in grid
Message
De
27/08/2003 21:53:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00822423
Message ID:
00824051
Vues:
15
Hi Sergey,

My gratitudes for your attention to this thread. Yes, I do put code in the AfterRowColChange event to update the textbox contents but ONLY when a MOUSE click, the DOWN or the UP key was used to position to a grid row.

I put have a UpdateTextBox property which I set to .T. if in the textbox keypress event the UP or DOWN keys were pressed, but am at a loss on how to determine if a MOUSE click was used. The UpdateTextBox property is being used by the AfterRowColChange to determine if it will update the textbox contents or not.

Thanks

Dennis

>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform