Main Board > Language

Radio Button Disabling

(1/2) > >>

James Zukowski:
A couple of questions on this:

* Is it possible to Disable or Enable an entire Radio Button group with one statement, other than setting the group up in Group Assignment and using *wingrp?
* Is it possible to "uncheck" all of the Radio Buttons in a group once one of them has been selected?Thanks!

James Zukowski:
Any insights?

Mike King:
Regarding your questions:

* The easiest way to disable/enable all radio buttons in a group is issue a DISABLE CONTROL nnn (or ENABLE CONTROL nnn) where nnn is the radio button CTL value. 
* To uncheck try setting the 'Value$ property to ""

James Zukowski:
Mike:
The Enable/Disable Control works perfectly. Thanks!
The null assignment, however, not so much. Yes, it does clear the RB's, but it also throws Error #65.
I've also tried setting the 'ID to 0, but not apparent effect.

Mike King:
Setting the Value$ to "" seems to work for me.


--- Code: --- print '4D','B?','CS',
rb=10
radio_button rb:1,@(10,10,10,1)="One"
radio_button rb:2,@(10,11,10,1)="Two"
radio_button rb:3,@(10,12,10,1)="Three"
button 11,@(10,14,10,2)="Reset"
while 1
obtain (0,siz=1)'ME',*,'MN'
if ctl=4 or eom=esc then break
print "Ctl ",ctl," received"
if ctl=11 then rb'value$=""
wend

--- End code ---
I can select any of these buttons and then press the Reset to clear.

Navigation

[0] Message Index

[#] Next page

Go to full version