Skip to content

Commit

Permalink
fixed double selection on radio #235
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisteach committed Jan 16, 2018
1 parent adf66f9 commit fc7e24c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions appJar/appjar.py
Expand Up @@ -6906,6 +6906,7 @@ def radioButton(self, title, name=None, *args, **kwargs):
except:
self.setRadioButton(title, name, callFunction=callFunction)
rb = self.getRadioButton(title)
selected = False
else:
rb = self._radioButtonMaker(title, name, *args, **kwargs)

Expand Down
7 changes: 5 additions & 2 deletions examples/sg_radio.py
Expand Up @@ -3,15 +3,18 @@
from appJar import gui

def press():
app.radio("song", "Paradise City", selected=True, bg="pink")
print("STARTING setter")
app.radio("song", "Paradise City", selected=True, bg="pink", callFunction=False)
print("ENDING setter")

def change():
print("in changer")
print(app.radio("song"))

with gui() as app:
app.radio("song", "Killer Queen", bg="red")
app.radio("song", "Paradise City")
app.radio("song", "a")
app.radio("song", "a", bg="green", fg="yellow")
app.radio("song", "b")
app.radio("song", "c", change=change)
app.button("PLAY", press)

0 comments on commit fc7e24c

Please sign in to comment.