Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursorsetprop() +tablerevert()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00067244
Message ID:
00067823
Vues:
25
>>>What I want to check for, is if the user started to edit some fields before I do the tablerevert() on a newly appended record.
>>Timothy,
>>
>>You need to check out GetFldState(-1) to find out what has been changed or edited by the user on the new record.
>
>Well the prob I'm having is this. A new record is appended with the
>=cursorsetprop("buffering",2), a field is automatically replaced with a control # and then, for testing, I click cmdbutton 'Quit' which has this code in it: ?GETFLDSTATE(-1)
>and the result is '1111111111111111111111' ALL ONES!
>This cannot be right!
Timothy,

Is the command button in a toolbar? If it is then it never gets focus, which means the textbox never loses focus, which means the textbox never updates its controlsource, which means that all 1's is the right answer until the textbox loses focus. The solution, in the command button's click in the toolbar do this before you test getfldstate();

IF TYPE("_screen.activeform.activecontrol.name") = "C"
_screen.activeform.activecontrol.setfocus()
ENDIF

This will force the current control to lose and then regain focus thus updating its controlsource.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform