tneelu3
asked on
Disable radio buttons
How to make one of the radio button disable and other should be enable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
a) A simple way is that u can take the 2 radio buttons in a group box and in the properties of one of the radio button select the checked option. So at any point of the time only one radio button will be enabled while the othere will be disabled. But u can enable the other radio button and when u do so the first one will get disabled.
b) If u do not want to put the radio buttons in a a group box:
Set one of the radio buttons as checked in the properties.
Assune there are rb_1 & rb_2
clicked event of rb_1
rb_2.checked = false
rb_1.checked = true
clicked event of rb_2
rb_2.checked = true
rb_1.checked = false
a) A simple way is that u can take the 2 radio buttons in a group box and in the properties of one of the radio button select the checked option. So at any point of the time only one radio button will be enabled while the othere will be disabled. But u can enable the other radio button and when u do so the first one will get disabled.
b) If u do not want to put the radio buttons in a a group box:
Set one of the radio buttons as checked in the properties.
Assune there are rb_1 & rb_2
clicked event of rb_1
rb_2.checked = false
rb_1.checked = true
clicked event of rb_2
rb_2.checked = true
rb_1.checked = false
if its the matter of checked then you can write this script
clicked event for rb_1
if this.checked=true then
rb_2.checked=False
End if
clicked event for rb_2
if this.checked=true then
rb_1.checked=False
End if