Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lostfocus by mouse click
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01633146
Message ID:
01633206
Vues:
39
>What I am trying to achieve, Yousfi, is this - I have a form that shows a lot of information about jobs. You type in the job number, or the invoice number, and the form finds it, and loads all the details. Then it setfocus to the field to post a payment. The user types in the amount and hits TAB, or ENTER, and focus goes back to the field to call up the next job. So the lostfocus of the payment field sets focus to the 'look up the job/invoice number' field again. It is fast and very convenient when they have to post a lot of payments, but every now and then they will need to look up something in the rest of the form, or make a note in an edit box. The problem is that a mouse click registers the same lastkey() value as ENTER button, which will take you to the call up job field again. So in lostfocus I have had to specify TAB and ENTER to go to the lookup field again. DownArrow on the keybord takes them to another empty field, from where they can now click the mouse on the pageframe for details, or the edit boxes for notes, but it isn't professional. It would be professional if they don't need to enter payment to just click on the edit box, or pageframe, and that which is clicked on gets the focus. This is what I am trying to solve...

I've tackled this before - if I remember right what I did was put code in all the setfocus() events (and I think page.activate events of pageframes) that kept track of what control I was at last (previously) in a public array or temp table. So kinda like this...

in setfoucs
a) store where I'm at now (to be used later)
b) look at where I just came from (which would be from previous controls a)
c) decide where to go or what to do based on b)
ICQ 10556 (ya), 254117
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform