Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing class in the form designer
Message
From
13/06/2001 00:04:19
 
 
To
12/06/2001 13:04:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00517829
Message ID:
00518713
Views:
15
>>>Why not just use 1 textbox class and add an Enabled_Assign method to your textbox that changes all the properties of the textbox to what the need to be under enabled and disabled conditions.
>>
>>... as I mentioned in the other reply. <s>
>>
>>But, there was other reasons why we wanted to isolate it. I might however turn into that approach when I'll update our framework.
>
>Even with enabled_assign method, you may want to have either a separate class, or an additional property, which will keep the state of your textbox. I have such a property named .Say (as a reminder to the behavior of @x,y say var of non-V versions of Fox), which comes in handy when you need to disable all the controls on the form (except maybe a few) and then want to re-enable only some of them. In my case, those with .say=.t. remain disabled. So in Enabled_assign I could have something like
>
this.enabled=m.vNewVal and not this.say
>so I could do thisform.setall('enabled',.t.) and the textboxes would get enabled as I want them.

Yes, we have a SetAll() method in the base form. We used it for exactly the purpose you just explained.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform