General information
Category:
Forms & Form designer
Hi Alan,
>In my baseclass textbox, readonly=.F. (ie. the VFP default).
>In an instance of this textbox on a particular form, I set readonly=.T. in the PEM sheet.
>I run the form, suspend the program in the textbox.init() method, this.readonly=.T. (as I would expect), but after I run this.resettodefault(), this.readonly=.F., which is not as I set it at designtime.
>
>Hope this is clearer.
Yup, I hadn't realized you were talking aggregated classes with switched properties.
Off hand, I see no other way but to read out the vcx properties,
to see if they modify the class level and a resettodefault should be "overinstanced" at the form level again.
If no change at the instance level can be found, resettodefault is correct.
This should be cleaner than another createobject or do form to get an unmodified class, since the property could be changed in .load() or .init().
If you look at the properties memo field(s), you should feel right at home. Might be some work to find the correct record,
since a control could be added at different levels, but if REALLY necessary this should be doable even in a generic way.
If you decide to do it, pls. send some of the finished code -
I love [thinking out] such hacks as you might have guessed.
You never know when you need them <g>.
rgds
thomas
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only