PxPlus User Forum

Main Board => Discussions => Language => Topic started by: James Zukowski on August 23, 2018, 06:55:35 PM

Title: Radio Button Disabling
Post by: James Zukowski on August 23, 2018, 06:55:35 PM
A couple of questions on this:
Thanks!
Title: Re: Radio Button Disabling
Post by: James Zukowski on August 27, 2018, 09:55:39 AM
Any insights?
Title: Re: Radio Button Disabling
Post by: Mike King on August 27, 2018, 10:21:32 AM
Regarding your questions:
Title: Re: Radio Button Disabling
Post by: James Zukowski on August 27, 2018, 10:32:16 AM
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.
Title: Re: Radio Button Disabling
Post by: Mike King on August 27, 2018, 04:08:52 PM
Setting the Value$ to "" seems to work for me.

Code: [Select]
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.
Title: Re: Radio Button Disabling
Post by: James Zukowski on August 27, 2018, 05:44:45 PM
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!)