Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can Setall copy one property to another?
Message
From
24/02/2004 16:08:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00880459
Message ID:
00880470
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
>Hi,
>
>I have added a lSaveReadOnly property to my textboxes and saved the old value of their ReadOnly property. When the user clicks a button, I want to set their ReadOnly property to the value of their lSaveReadOnly property. I have tried:
>
>thisform.setall("ReadOnly",lsavereadonly,"txtedit")
>and
>thisform.setall("ReadOnly",this.lsavereadonly,"txtedit")
>
>but neither seems to work. The following works:
>
>thisform.setall("ReadOnly",.f.,"txtedit")
>
>but I want to use the value of the lSaveReadOnly property rather than a hard-coded .f.

I suspect "This" is understood to mean the object in which you are executing the code; not each object which you are trying to set.

Perhaps you can use a FOR EACH loop instead of SetAll(). Another option might be an access or assign method in the baseclass of your TxtEdit objects: accessing a property would fire a method.
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
Reply
Map
View

Click here to load this message in the networking platform