Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SelStart function
Message
De
29/03/2006 12:48:51
Steven Dyke
Safran Seats USA
Texas, États-Unis
 
 
À
20/02/2006 12:24:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01097121
Message ID:
01108891
Vues:
34
If I can I would like to get back on this issue because the users of my app are really complaining. I have done a few more tests and have narrowed down the when part but not the why part.

Form Set up:

main form fields for one record(Inspection Record - Header data)
grid holds child records(Inspection Items)

grid is located in a pageframe along with a button to add a child record and a button to save a child record.

Form edit behavior:(That works)

Form appears with cursor in first editable field and has focus
User Clicks in a grid cell, edits the data

Cell Code:

GotFocus
If ThisForm.currentrecordnumber <> getFAIItemQuery.recseq Then
If ThisForm.PageFrame1.Page1.Command1.Enabled = .T. And ThisForm.recordcheck = .F. Then
MessageBox("Did you forget to 'Save Item Data' on the last row you modified?")
ThisForm.recordcheck = .T.
EndIf

ThisForm.currentrecordnumber = getFAIItemQuery.recseq
EndIf

InteractiveChange
ThisForm.statuschangeid = getFAIItemQuery.inspectid
ThisForm.PageFrame1.Page1.Command1.Enabled = .T.(Save Button)
ThisForm.itemupdateflag = .T.

At this time a timer begins to fire, flashing a red container around the save button.

THIS WORKS FINE even with interactiveChange code.

However,

If the user clicks in a grid cell(may or may not do any typing), then into a main form control(say they forgot to fill in a text box), now they click back into the grid cell they left at the end of the string. When a key stoke is made the cursor will jump back to the begining of the string. This will not happen if the user clicks into any other grid cell before they click into the one that had focus or click the cell twice.

If I turn the interactiveChange code off in the cell control this does not happen. But why would it work ok in the first situation.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform