Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird form responses
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00464219
Message ID:
00465090
Vues:
16
hi Barbara
sorry i couldn't reply earlier.
herewith the code: (this is a 'reset' button (click event))

sele filez
set order to 4
ThisForm.Combo1.displayvalue='Select Office'
ThisForm.Combo2.displayvalue='Select Location'
store spac(40) to msubject,mid
store spac(30) to mcompany
store spac(20) to moffice,mlocation,mcabinet
store spac(10) to thispass,mbox
store '' to mnotes
store 0 to mrec
first_hit=.t.
thisform.refresh
ThisForm.Input_lrg1_ID.setfocus

it is a silly little app i put together to track the office filing and it shouldn't have taken more than a few minutes! and it didn't as far as working with actual mouse clicks. the problem arises when the 'Alt' shortcuts are used. the last line of the above code should set the focus to the first input field again after the 'reset' button is 'clicked', but it doesn't. i have found that the problem jumps up with the 'thisform.refresh' line. everything refreshes as it should, but the focus ends up in an edit box instead of the first input. as a workaround, i have put code in the form KeyPress event that resets the memvars and then individually resets each input's Value to ''. eg:ThisForm.Input_lrg1_ID.Text1.Value='' and then after doing that for all the input's, setting focus to the first input. (i have an input class similar to one that comes with the VFP7 beta, made up of a label, a textbox and a shape for shadow behind the textbox). if you have any ideas - i am all ears!
thanx again - john
ps: if you want a shot of the screen to see the flow and where the focus ends up, email me at jcmca@flashmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform