Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AddObject design and runtime
Message
 
To
07/07/2008 08:46:01
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01329366
Message ID:
01329378
Views:
12
>>>>>Hi,
>>>>>I there way to know if container add to the form in design time or runtime
>>>>>
>>>>>For example.. I need to have in the Container.Init()
>>>>>IF expression.. if container was add to the form using AddObject.. I must add bindevents code.. if container was add to the form in design time - then ignore bindevents .
>>>>>
>>>>>Any idea,
>>>>>Thanks
>>>>>Denis
>>>>
>>>>Just add one more property in that class. Make it to be .T. as default. Then in Init:
>>>>
>>>>IF this.BindEventsProp
>>>>   *** BINDEVENTS()
>>>>ENDIF
>>>>
>>>>
>>>>Then if you add that container in design mode just change this property to .f.
>>>
>>>Hi Borislav,
>>>It seems no solution. The problem is, its bad subclassed in existing application.. too much subclasses everywhere. and also.. too much calls with addObject so big chance to forget somewhere to fix it. Looking for way to change only baseclass.
>>
>>In init you could test VISIBLE, but that is not the solution also if you set that property to .f. in design mode.
>
>Hey.. but this is might be solution!!! because when addObject - we must always set the visible property to .T... and in design mode - its as default. It seems good idea!

Yes, but only if you in design mode didn't set that property to .f. so that control to be hidden when the form starts.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform