Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I change the controlsource in the Init() of a object
Message
 
To
24/01/2000 11:53:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00321642
Message ID:
00321685
Views:
18
Yes this can work, But I am looking for a way to revent retype all control source. Plus the MyAlias is not existing sometime.

So my solution is to add to all control a custome property "MyCtrlSource" and set the controlsource in the init() of the container object.

>
Jean,
>If you change the alias in init then it should be available (if you're setting it to IsAlias.MyField then IsAlias must be available). Before init form.load or form.de would open it. If you have situation where availability is postponed then create a method that would do it. Method :
>-Checks availablity of alias.
>-If exists loops through controls and sets controlsource to :
>stuff(Controlsource,1,at(".",Controlsource)-1,"NewAlias")
>(You might want to check if controlsource is in MyTable.MyField format)
>-Refreshes control
>
>Or alternatively if you're using DE :
>-In DE change cursorsource and database of the cursor using "myAlias"
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform