Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check a Control has controls?
Message
De
04/12/2015 00:44:15
 
 
À
03/12/2015 18:20:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01628447
Message ID:
01628466
Vues:
77
>>How to check an object in my container, which containes 3 objects, has controls?
>>
>>I have a container with 3 objects,
>>objects(1). has the usual number of objects
>>objects(2) and 3 are blank
>>
>>MyObject.ControlCount returns 3
>>myObject.Controls(1).baseclass returns "Container"
>>myObject.Controls(2).baseclass errors
>>
>>and although indeed debugger shows value (Object) for myObject.Controls(2) and 3,
>>debugger also shows myObject.Controls.+Controls(1) and no + sign for Control(2) and Controls(3) so apparently empty. How to check in code for this situation?
>>
>>I have a recursive setallprops function which errors on Controls(2) = empty control
>
>myObject.Controls(2).ControlCount = 0

Hi,
The Object(2) has no controls, also not the control ControlCount, it seems it is not fully instantiated.

Have now introduced on my form property lAfterinit = .F. and set to .F. in the Afterinit which is called in the Init.
The procedure SetAllProps is activated when ThisForm.lAfterinit = .T.
this seems to work.
Thanks
Regards,
Koen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform