Página 1 de 1

Reading conntrols in a loop

Publicado: Vie Ago 24, 2007 2:38 pm
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

Reading conntrols in a loop

Publicado: Vie Ago 24, 2007 5:27 pm
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

Reading conntrols in a loop

Publicado: Vie Ago 24, 2007 5:27 pm
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

Reading conntrols in a loop

Publicado: Vie Ago 24, 2007 7:14 pm
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

Reading conntrols in a loop

Publicado: Vie Ago 24, 2007 7:14 pm
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

Reading conntrols in a loop

Publicado: Sab Ago 25, 2007 10:17 pm
por notengo
Stephan,
> Thanks José,
> after changing 'Combobox' to 'TCombobox' it worked.
yup ! :-) Your are right.
Regards,
José Lalí­n

Reading conntrols in a loop

Publicado: Sab Ago 25, 2007 10:17 pm
por notengo
Stephan,
> Thanks José,
> after changing 'Combobox' to 'TCombobox' it worked.
yup ! :-) Your are right.
Regards,
José Lalí­n