Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling controls
Message
 
To
21/05/2001 01:20:44
General information
Forum:
Visual FoxPro
Category:
Visual ProMatrix
Miscellaneous
Thread ID:
00509330
Message ID:
00509518
Views:
19
hi, try this....

1) Create a base class of Textbox
2) Add Two-property 1) calias 2) ccontrolsource
3) Write following code in INIT method in baseclass

IF !USED(This.calias)
USE This.calias
ENDIF

SELECT (This.calias)

IF TYPE(This.ccontrolsource) != 'U'
This.controlsource = This.ccontrolsource
ENDIF

4) Now in your form use this textbox.
5) Do not mention control source but instead of that write in ccontrolsource
6) Do fill calisa ( Table Name )

If you using a framework then it would be easy to add this code, other wise you can write directly in your TEXTBOX control with little modification. And add write few lines to disable control as needed.

Try out this I think it would help you, let me know if any thing missing….

Thanks
Mihir


>Hi VFP users & gurus
>
>I need to be able to disable some data controls such as textboxes to make my application backward compatible. Normally, application will bomb if the field to which the data control is tied to, doesn't exist. Thanks.
Previous
Reply
Map
View

Click here to load this message in the networking platform