Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>I have a form with a grid control on it.
>In the Valid event of one of the column will calling FORM2.
>After the FORM2 was closed,the focus of grid was STILL KEEP on that field,i.e. not advance to next column.
>
>How can I solve this problem ?
>Please kindly comment.
if your valid method returns .f. then you will retain focus on the original control. If you return a value from your called form2 it can be used to change the value property of the control you were on. thisform.control.value = returned_value. If you want to retain focus on your current control you simply call the setfocus method. Thisform.control.setfocus() . Be careful about hte firing order of the methods you are using to set values. The vfp samples have a n example which lists the order in which the methods execute. It is in vfp\samples\solutions project. hth b
Précédent
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