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.

All controls of a form

Xailer professional forum in English
Responder
Guest

All controls of a form

Mensaje por Guest »

Hi,
is it possible to create an array with all controls that have been created
in a form?
Best regards, Timm.
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

All controls of a form

Mensaje por jfgimenez »

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
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

All controls of a form

Mensaje por jfgimenez »

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
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Guest

All controls of a form

Mensaje por Guest »

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
>
Guest

All controls of a form

Mensaje por Guest »

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
>
Responder