Radio buttons not redrawing
Posted: Thu Mar 28, 2019 4:32 pm
Hello,
I think that this may be a bug, but I'm not sure.
I have a group of 12 buttons set with a GroupID of so that they act as radio buttons.
If I just press the buttons with a mouse they work just fine.
However, I also want, under certain circumstances, to change the button programmatically.
I have references to all the relevant buttons in an array, called Button, so that I can access a specific button based upon an integer index.
So I have code in the ProcessSample() method that:
1) detects when a different button should be pressed
2) calls Buttons[NewButton].SetValue(1.0); to simulate button press
3) this causes Notify() to run. Notify runs correctly in all cases.
4) I can see my actions associated with the programmatically selected button press take place.
5) The previously pressed button goes to the "released" colour and the newly "pressed" button goes to the "pressed" colour - sometimes!!!
It's the "sometimes" in step 5 that's causing me the problems.
Any idea what's causing this?
Does the ProcessSample() method call Notify() thereby causing ProcessSample() to take too long?
Any ideas about a workaround?
Many thanks...
gary
I think that this may be a bug, but I'm not sure.
I have a group of 12 buttons set with a GroupID of so that they act as radio buttons.
If I just press the buttons with a mouse they work just fine.
However, I also want, under certain circumstances, to change the button programmatically.
I have references to all the relevant buttons in an array, called Button, so that I can access a specific button based upon an integer index.
So I have code in the ProcessSample() method that:
1) detects when a different button should be pressed
2) calls Buttons[NewButton].SetValue(1.0); to simulate button press
3) this causes Notify() to run. Notify runs correctly in all cases.
4) I can see my actions associated with the programmatically selected button press take place.
5) The previously pressed button goes to the "released" colour and the newly "pressed" button goes to the "pressed" colour - sometimes!!!
It's the "sometimes" in step 5 that's causing me the problems.
Any idea what's causing this?
Does the ProcessSample() method call Notify() thereby causing ProcessSample() to take too long?
Any ideas about a workaround?
Many thanks...
gary