Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Basic input routine
Message
De
14/06/1999 09:28:01
 
 
À
14/06/1999 08:53:01
Salminen Jukka
Js Software Systems
Vaasa, Finlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00229394
Message ID:
00229401
Vues:
13
>I have been programming in Foxpro DOS and VFP 3.0 for some time. Now I would like to move into VFP 5.0. I have some difficulties in understanding the 5.0 event model. I need to create a simple input routine with a few text boxes. I want to validate the input in each text box

You put your validation routine in the Valid() event of each textbox. If you return false from the Valid() event, the focus stay in the current textbox.

>and depending on user input I want to move the focus to some other textbox.

SomeOtherTextBox.SetFocus() in the LostFocus() of the textbox.

>If the input cannot be accepted the focus should stay on the same textbox

RETURN .F. in the Valid() event.

>and a custom error message is displayed in a WAIT-window.

WAIT WINDOW "Error message" in the Valid() event.

>At the bottom of the form is a command button that GATHERs the information

GATHER should not be used in VFP. Bind your textbox on the fields and use record/table buffering. Save your changes with TableUpdate() or cancel them with TableRevert().

>and sets the focus back to the first textbox.

FirstTextBox.SetFocus()

>What commands (SetFocus, Return's?) should I use and where should they be placed in order to get the desired functionality?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform