Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I set a CHECKBOX to read only?
Message
From
23/10/1997 11:57:05
 
 
To
15/10/1997 14:48:16
Bob Lucas
The WordWare Agency
Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00054720
Message ID:
00056362
Views:
31
>>>>In my FORM, I want to set a CHECKBOX to read only?
>>>>any ideas?
>>>
>>>I have added a property called lreadonly to my base checkbox class. This allows setting readonly to true or false. The default value is .F. so the checkbox is NOT read only. In the When of my default class I have added
>>>RETURN !lreadonly
>>>
>>>I don't use the enabled property because of the way it changes the colour on the label.
>>>
>>>If you need to add code to the when of a sub-classed checkbox be sure to do something like this:
>>>
>>>lok = DODEFAULT()
>>>
>>>IF !lok
>>> RETURN lok
>>>ENDIF
>>>
>>>Or just a simple RETURN lok at the end.
>>
>>Hey Bob - thanks for answering.
>>Do I create a base class of checkbox? first..
>>then move it to the form.
>>I guess I am mot sure of the steps.
>>thanks .. :)
>
>I have a class library that subclasses all of the VFP base classes. For classes like the checkbox, I add a lreadonly property. All of my data entry classes (textboxes, combos, editboxes) have an oldvalue property. In the when method of these classes i have this code.
>this.oldvalue = this.value. Then I can compare the oldvalue to the current value to see if any changes have been made. This might trigger some other action or if the data isn't valid, set it back to the old value.
>
>If you subclass the VFP base classes, and only use these subclasses on your forms, if you add some new functionality to your baseclass, it is available to all instances of that class.

thanks Bob for the information :)))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Reply
Map
View

Click here to load this message in the networking platform