Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Command Buttons and enabling fields
Message
De
08/03/2002 10:32:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/03/2002 10:30:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00630191
Message ID:
00630212
Vues:
25
>>Would appreciate someone to point me where I could get information on creating command buttons. I am still a newbie at VFP and doing well copying routines from other projects but now trying to create my own form.
>>
>>I have created a simple form with fields from a table and want to edit existing records and add new records. I have noticed that a sample form I have seen will not allow any field to be modified unless the edit button or add button is pressed. I realize that individual fields have the enable function but how does one get all the fields enabled or disabled based on a command button?
>
>To enable a field, you change its Enabled or ReadOnly property. For instance, in the Click() event of a command button:
>
>
>ThisForm.TxtField1.Enabled = .F.
>
>or
>
>ThisForm.TxtField1.ReadOnly = .T.
>
Also, it isn't necessary to disable fields. If you use buffering, you can save changes with TableUpdate(), and discard changes with TableRevert().

See also:
CursorSetProp("Buffering")
GetFldState()
GetNextModified()
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform