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.

Reading conntrols in a loop

Xailer professional forum in English
Responder
Stephan Hennekens
Mensajes: 305
Registrado: Jue Nov 30, 2006 12:17 am

Reading conntrols in a loop

Mensaje por Stephan Hennekens »

How can I read the values of a serie of comboboxes in a loop (in a generic
way)?
The names of the comboboxes are for example oCmxYear1, oCmxYear2, oCmxYear3,
etc.
Regards,
Stephan
notengo
Mensajes: 417
Registrado: Vie Oct 12, 2007 1:29 pm

Reading conntrols in a loop

Mensaje por notengo »

Stephan,
> How can I read the values of a serie of comboboxes in a loop (in a generic
> way)?
> The names of the comboboxes are for example oCmxYear1, oCmxYear2, oCmxYear3,
> etc.
WITH OBJECT <oMyForm>
FOR i := 1 TO Len( :aControls )
IF :aControls[ i ]:Classname() == "Combobox" )
...
NEXT
NEXT
Regards,
José Lalí­n
notengo
Mensajes: 417
Registrado: Vie Oct 12, 2007 1:29 pm

Reading conntrols in a loop

Mensaje por notengo »

Stephan,
> How can I read the values of a serie of comboboxes in a loop (in a generic
> way)?
> The names of the comboboxes are for example oCmxYear1, oCmxYear2, oCmxYear3,
> etc.
WITH OBJECT <oMyForm>
FOR i := 1 TO Len( :aControls )
IF :aControls[ i ]:Classname() == "Combobox" )
...
NEXT
NEXT
Regards,
José Lalí­n
Stephan Hennekens
Mensajes: 305
Registrado: Jue Nov 30, 2006 12:17 am

Reading conntrols in a loop

Mensaje por Stephan Hennekens »

Thanks José,
after changing 'Combobox' to 'TCombobox' it worked.
Regards,
Stephan
"José Lalín" <notengo@correo.com> wrote in message
news:[email=46cef928@ozsrv2.ozlan.local...]46cef928@ozsrv2.ozlan.local...[/email]
>
> Stephan,
>
>> How can I read the values of a serie of comboboxes in a loop (in a
>> generic way)?
>> The names of the comboboxes are for example oCmxYear1, oCmxYear2,
>> oCmxYear3, etc.
>
> WITH OBJECT <oMyForm>
> FOR i := 1 TO Len( :aControls )
> IF :aControls[ i ]:Classname() == "Combobox" )
> ...
> NEXT
> NEXT
>
> Regards,
> José Lalín
Stephan Hennekens
Mensajes: 305
Registrado: Jue Nov 30, 2006 12:17 am

Reading conntrols in a loop

Mensaje por Stephan Hennekens »

Thanks José,
after changing 'Combobox' to 'TCombobox' it worked.
Regards,
Stephan
"José Lalín" <notengo@correo.com> wrote in message
news:[email=46cef928@ozsrv2.ozlan.local...]46cef928@ozsrv2.ozlan.local...[/email]
>
> Stephan,
>
>> How can I read the values of a serie of comboboxes in a loop (in a
>> generic way)?
>> The names of the comboboxes are for example oCmxYear1, oCmxYear2,
>> oCmxYear3, etc.
>
> WITH OBJECT <oMyForm>
> FOR i := 1 TO Len( :aControls )
> IF :aControls[ i ]:Classname() == "Combobox" )
> ...
> NEXT
> NEXT
>
> Regards,
> José Lalín
notengo
Mensajes: 417
Registrado: Vie Oct 12, 2007 1:29 pm

Reading conntrols in a loop

Mensaje por notengo »

Stephan,
> Thanks José,
> after changing 'Combobox' to 'TCombobox' it worked.
yup ! :-) Your are right.
Regards,
José Lalí­n
notengo
Mensajes: 417
Registrado: Vie Oct 12, 2007 1:29 pm

Reading conntrols in a loop

Mensaje por notengo »

Stephan,
> Thanks José,
> after changing 'Combobox' to 'TCombobox' it worked.
yup ! :-) Your are right.
Regards,
José Lalí­n
Responder