PxPlus User Forum
Main Board => Discussions => Language => Topic started by: James Zukowski on August 23, 2018, 06:55:35 PM
-
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!
-
Any insights?
-
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 ""
-
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.
-
Setting the Value$ to "" seems to work for me.
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
I can select any of these buttons and then press the Reset to clear.
-
Your code worked here, too, so I took it even SLOOOOOOWer...
It turns out I was calling the reset routine twice: first when a Button is clicked, and again when the Tab exits. The first one worked fine (it had a valid value set). The second one failed (No longer a valid value, so it Errored). This has been corrected.
Thank you for your insistence! (And assistance!)