Hi,
is it possible to create an array with all controls that have been created
in a form?
Best regards, Timm.
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
All controls of a form
All controls of a form
Timm,
> is it possible to create an array with all controls that have been created
> in a form?
FUNCTION GetAllControls( oParent )
LOCAL aControls := {}
GetControls( oParent, aControls )
RETURN aControls
STATIC PROCEDURE GetControls( oParent, aControls )
LOCAL oCtl
IF oParent:IsKindOf( "TWinControl" )
FOR EACH oCtl IN oParent:aControls
AAdd( aControls, oCtl )
GetControls( oCtl, aControls )
NEXT
ENDIF
RETURN
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
> is it possible to create an array with all controls that have been created
> in a form?
FUNCTION GetAllControls( oParent )
LOCAL aControls := {}
GetControls( oParent, aControls )
RETURN aControls
STATIC PROCEDURE GetControls( oParent, aControls )
LOCAL oCtl
IF oParent:IsKindOf( "TWinControl" )
FOR EACH oCtl IN oParent:aControls
AAdd( aControls, oCtl )
GetControls( oCtl, aControls )
NEXT
ENDIF
RETURN
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
All controls of a form
Timm,
> is it possible to create an array with all controls that have been created
> in a form?
FUNCTION GetAllControls( oParent )
LOCAL aControls := {}
GetControls( oParent, aControls )
RETURN aControls
STATIC PROCEDURE GetControls( oParent, aControls )
LOCAL oCtl
IF oParent:IsKindOf( "TWinControl" )
FOR EACH oCtl IN oParent:aControls
AAdd( aControls, oCtl )
GetControls( oCtl, aControls )
NEXT
ENDIF
RETURN
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
> is it possible to create an array with all controls that have been created
> in a form?
FUNCTION GetAllControls( oParent )
LOCAL aControls := {}
GetControls( oParent, aControls )
RETURN aControls
STATIC PROCEDURE GetControls( oParent, aControls )
LOCAL oCtl
IF oParent:IsKindOf( "TWinControl" )
FOR EACH oCtl IN oParent:aControls
AAdd( aControls, oCtl )
GetControls( oCtl, aControls )
NEXT
ENDIF
RETURN
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
All controls of a form
Jose,
works great, many thanks!
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=46c170ed@ozsrv2.ozlan.local...]46c170ed@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> is it possible to create an array with all controls that have been
>> created in a form?
>
> FUNCTION GetAllControls( oParent )
> LOCAL aControls := {}
> GetControls( oParent, aControls )
> RETURN aControls
>
> STATIC PROCEDURE GetControls( oParent, aControls )
> LOCAL oCtl
> IF oParent:IsKindOf( "TWinControl" )
> FOR EACH oCtl IN oParent:aControls
> AAdd( aControls, oCtl )
> GetControls( oCtl, aControls )
> NEXT
> ENDIF
> RETURN
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
works great, many thanks!
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=46c170ed@ozsrv2.ozlan.local...]46c170ed@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> is it possible to create an array with all controls that have been
>> created in a form?
>
> FUNCTION GetAllControls( oParent )
> LOCAL aControls := {}
> GetControls( oParent, aControls )
> RETURN aControls
>
> STATIC PROCEDURE GetControls( oParent, aControls )
> LOCAL oCtl
> IF oParent:IsKindOf( "TWinControl" )
> FOR EACH oCtl IN oParent:aControls
> AAdd( aControls, oCtl )
> GetControls( oCtl, aControls )
> NEXT
> ENDIF
> RETURN
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
All controls of a form
Jose,
works great, many thanks!
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=46c170ed@ozsrv2.ozlan.local...]46c170ed@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> is it possible to create an array with all controls that have been
>> created in a form?
>
> FUNCTION GetAllControls( oParent )
> LOCAL aControls := {}
> GetControls( oParent, aControls )
> RETURN aControls
>
> STATIC PROCEDURE GetControls( oParent, aControls )
> LOCAL oCtl
> IF oParent:IsKindOf( "TWinControl" )
> FOR EACH oCtl IN oParent:aControls
> AAdd( aControls, oCtl )
> GetControls( oCtl, aControls )
> NEXT
> ENDIF
> RETURN
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
works great, many thanks!
Best regards, Timm.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> schrieb im Newsbeitrag
news:[email=46c170ed@ozsrv2.ozlan.local...]46c170ed@ozsrv2.ozlan.local...[/email]
> Timm,
>
>> is it possible to create an array with all controls that have been
>> created in a form?
>
> FUNCTION GetAllControls( oParent )
> LOCAL aControls := {}
> GetControls( oParent, aControls )
> RETURN aControls
>
> STATIC PROCEDURE GetControls( oParent, aControls )
> LOCAL oCtl
> IF oParent:IsKindOf( "TWinControl" )
> FOR EACH oCtl IN oParent:aControls
> AAdd( aControls, oCtl )
> GetControls( oCtl, aControls )
> NEXT
> ENDIF
> RETURN
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>