Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Hey Larry
How goes? Congrats on getting MVP. Here's a little VMP style problem and solution I've come up with. I've got my frmDEGridNav2Pages form with a Selection Criteria container on the first page. There's a button to trigger generating the view parameters and requerying the view.
I wanted to make the enter key click the button, so I initially set the button's DEFAULT property to .T. in the ctrSelCriteria.GotFocus and reset it to .F. in the ctrSelCriteria.LostFocus.
I gave up on that when I found that even though the LostFocus was firing and setting the Default to .F., the button remained the default even when I went to the next page. I even tried putting code in the pgfPageRefresh.CommonPageActivate to set the default to .F..
Anyways, what I finally did was to set THISFORM.KeyPreview to .T. and added some code in the form's KeyPress to check for an enter key and if the object obtained by oForms.RealActiveControl() was in my ctrSelCriteria. If that condition was met, I fired the method called by the button's click.
Strange but true.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement