Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command Buttons and enabling fields
Message
From
08/03/2002 10:30:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/03/2002 10:19:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00630191
Message ID:
00630209
Views:
26
>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.
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform