PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD22] Radio button inside Looper
[WD22] Radio button inside Looper
Iniciado por guest, 21,mar. 2018 16:22 - 3 respuestas
Publicado el 21,marzo 2018 - 16:22
Good morning, I'm trying to modify the captions of a radio button that is inside a looper by programming, I use the next code:

LOOP_Cuestionario[nFila].RADIO_OpcionesMultiples[stOpc.nOPC_ORDEN]..Caption = stOpc.sOPC_TEXTO

But when I run it, windev says that the operator [] is not supported by the radio control. Any ideas as how to solve this?
Publicado el 21,marzo 2018 - 16:34
Hi

if it is possible, it will most probably have to be through an attribute on the radio control...
For lists, its possible to give all the values as a CR delimited string (one line per line, so to say), so I would try the same trick with the radio control.

Best regards
Publicado el 21,marzo 2018 - 16:36
Thanks Fabrice! I was looking at the attributes on the Radio control, but I don't see anything that could help me with the options caption :/ there's only caption, anyway I'll try it by attributes and CR.
Publicado el 21,marzo 2018 - 18:50
Add an attribute on your looper and select the Radio Button as the control.
Second option in the 'Propety' dropdown is Caption.
IF MyVal = True THEN MyLpr.attRadioCap = "xxxx" ELSE MyLpr.attRadioCap = "yyyy" END
Works for me