Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read-only toggle?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00092806
Message ID:
00092845
Views:
29
>>>>>Is there a simple way to switch a standard data entry form to read-only? I have a rather complex five-tab page frame, including a grid for a child table, that I would like to be able to use for those who have been designated with Read Only ability. The user status would be identified as a property of the application object, so it would be easy to check in the form's init method, but then what? Do I need to list all of the controls on the form with a readonly = .t.? (assuming the default is .f. -- although the opposite might actually be more efficient (having the controls made editable for those few users with the authority to edit.
>>>>
>>>>George solution is agood one. But you can set your dataenvironment cursors with buffermodeoverride property to 2 to 4 values and then disabled only the only one method that runs the tableupdate() function. So even if the user make changes, they will be ignored.
>>>
>>>Or .ReadOnly = .T.
>>
>>thats right too. possibly better, but faster?
>
>I'm not sure, haven't tested it on a large table. BTW, the advantage that .SetAll() has is that the user automatically has a visual clue that the table can't be modified. With either of these methods, perhaps the form's .Caption should be changed to indicate that no modifications are allowed.

Ok. thats a good observation, but if you use setall function, you must done it for each page (and any other container) of your form. It could be hard.
Saludos,
A.G.P.
---------
Previous
Reply
Map
View

Click here to load this message in the networking platform