Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where do I enable/disable
Message
From
20/08/1998 09:43:13
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00128401
Message ID:
00128463
Views:
45
Hi Peter ---

So the enable/disable is based on the state of the Form (captured by the Mode property)? IF so, I would think you'd want to test THISFORM.Mode within the Refresh method of the Form's controls so that they can change their "states" as desired. Also consider using customized control classes to put that code in ther class's refresh and not in each individual controls refresh.

A good discussion on this can be found in John Petersen and Rod Paddocks book "Visual FoxPro 5 Enterprise Development"


>Being a relative newcomer to VFP when I wrote my first app, I still coded my enable/disable, RO/RW code for my form controls in the Init of my form, I am now a little more OOP aware and would like to move it to the relevant classes, e.g. in the init of the control
>
>if this.parent.mode = 'VIEW'
> this.readonly = .t.
>endif
>
>etc..., can anyone give me some direction on this.
>Regards
>Pete Kane
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform