I have 2 RadioButtons in a GroupBox, in a Sheet window. The buttons do not turn each other off.
- controls are not touching / overlapping
- the GroupBox IS in fact the parent of both buttons
I click one button, the other one is supposed to turn off. It doesn't.
[EDIT: added info:
- initial states in the IDE for both buttons: unchecked
- putting the buttons on a canvas or empty label doesn't change anything
- changing the window type does nothing
- putting the buttons in a control group changes nothing
- happens both in DebugBuild and in the built app]
I forced the value of the other button to not me.value in the Action event of both buttons. Does nothing. I put a condition there, to only change it if the value it not the opposite. Nothing.
Then I found out, if I show a MessageBox in the Action event, when a RadioButton is clicked, then it works. Which suggests it's just a window redraw issue. [Also if I toggle away from the app and back, it's then displayed correctly.] So, I tried forcing a window redraw of the window with self.Invalidate. That does nothing. I tried Invalidate on all the controls in the action event. Nothing. I put the invalidates in the action event of a PushButton and after both radiobuttons show ON, clicked that pushbutton like a hamster on cocaine. After a random number of clicks on this pushbutton - could be 3 or could be 6 billion - the buttons finally refresh and display correctly. [Also just noticed that once both buttons are ON, if I then simply do nothing, after a while sometimes there is a random magical window refresh, and the correct button states are finally displayed.] Excuse me, but how idiotic is this?
MacOS 10.13.8, Xojo2019r1.1