PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Radio Button  in option cheched by programing
Radio Button in option cheched by programing
Iniciado por guest, 06,ene. 2015 14:28 - 5 respuestas
Publicado el 06,enero 2015 - 14:28
i am set radio button in program
that radio buttion in set 6 option.
but option cheched by programing
does not work this code:
------------------------
Radio_Button[5]..Selected=True
---------------------


help me
Publicado el 06,enero 2015 - 14:55
what about Radio_Button=5
Publicado el 06,enero 2015 - 18:44
Radio_Button
is radio button,
and 5 is a radio buttion in option 1,option 2,option 3,option 4,option "5"

but i select only radio button option 5 by windev code use
Publicado el 06,enero 2015 - 23:23
Hello Vijay

READ THE MANUAL - please.

Windev functions do not always apply to every control and the manual explains their context.

..Selected does not apply to radio box controls and the help text explains this.

A radio button is an indexed control that returns a numeric value for the option chosen so in your case it will return a number between 1 and 6 as the value when a user chooses one of the options

If you want to set it up to display the fifth optoin as "selected" then do as Paulo suggested and put that code in the control init.

This is all explained in the WD Highlight example which is referred to in the help text of the radio control.

Please do not abuse the goodwill of this forum by asking for help without first trying to help yourself. If your English language skills are not up to understanding the manaul, get help locally to interpret it.

Regards
Al
Publicado el 07,enero 2015 - 11:24
Hi I agree 100% with a Al

Vijay

Between tthe lines Al did explain how it works.

1 add values to the control options ( 7 tab discription window)

firstoption = 1
second option = 2

Radio_Button[5] = 5 might just do the trick
Publicado el 07,enero 2015 - 11:50
Hi Vijay
Maybe the radio-control is set again AFTER your code.
For example by a HFileToScreen in your code.
I would step through the code with de debugger.
Or if it is only on a device add some tracing or infoboxes to show the value of the radiobutton after you set it.