Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Modeless forms in a very large program
Message
 
To
28/01/2008 11:25:34
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01284682
Message ID:
01286235
Views:
20
>>One more question if I may. I am calling both of these in the Data Enviornment Load Tables event. If I don't I get errors because the control source for the text boxes, etc. do not exist. Calling the prgs from there has me a bit worried although it seems to work ok so far. Any thoughts?
>
>You can do it in form's .load(), though then any objects of the form you may need are still not instantiated. As a legal workaround, you can do it in form's .init(), you only have to design the form with .BindControls=.f., and then in .init(), when you're done with opening tables, creating cursors etc, set it to .t. (too bad it's made to work only once - there are times when unbinding controls on a flip of a switch would be cool ;).

Blast it, I forgot about .BindControls=.f. I'll move them back to the init where they were before the crash.

We have a way of unbinding the controls. We added a property to all data object classes that holds the source. After the form loads we call a prg that then copies the source to the ControlSource. That prg can also clear the contolsource of all objects based on a flag in another property common to all classes. Doing this allows us to do some interesting things when the user is searching for data.

Thanks again.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform