Information générale
Catégorie:
Visual ProMatrix
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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement