Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More SetFocus Problems
Message
De
24/05/1999 15:02:40
 
 
À
24/05/1999 12:34:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00222113
Message ID:
00222178
Vues:
25
Hi Gar ---

I have seen two solutions to this problem, one involving ActiveControl.LostFocus and the other is to do a REPLACE of the table.field of the ActiveControl.ControlSource with ActiveControl.Value if ActiveControl.BaseClass INLIST("TextBox","EditBox","ComboBox")...

The other solution was a bit more elegent but escapes me......

>I have what seems to be a standard problem -- only the standard fix is not working for me.
>
>I have a formset which includes a toolbar -- "save" button is on the toolbar which does an tableupdate() wrapped in a transaction.
>
>When a user clicks on the save button, the value of the current control is lost.
>
>Of course I tried putting _Screen.Activeform.activecontrol.setfocus() in the click methods of both the toolbar and save button. No joy. I thought maybe there was a reference problem -- so far test purposes I hard coded to following to prevent the revert in only one control:
>
>frmsuppliers.frmdata1.txerr1.setfocus() && SET FOCUS ON ACTIVE CONTROL
>This is in the click event of both the toolbar and save button within the toolbar. The control the user is in when save is clicked still reverts if the user has not pressed enter or moved to another control before saving.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform