jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

setRadioTick error #534

Closed cristianmarian95 closed 5 years ago

cristianmarian95 commented 6 years ago

When i try to use this self.app.setRadioTick(title, tick=True) i get this error:

File "C:\Python\lib\site-packages\appJar\appjar.py", line 7471, in setRadioTick
    v.config(indicatoron=1)
  File "C:\Python\lib\tkinter\__init__.py", line 1482, in configure
    return self._configure('configure', cnf, kw)
  File "C:\Python\lib\tkinter\__init__.py", line 1473, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: unknown option "-indicatoron"
jarvisteach commented 6 years ago

I'm not seeing that problem...

Any chance you could provide:

cristianmarian95 commented 6 years ago

Windows / Python version 3.6 / AppJar version 0.9


 def addRadioButton(self, title, name, value=None, row=None, column=0, colspan=0, rowspan=0, trick=False):
        """ Method used to add radio message """
        self.app.addRadioButton(title=title, name=name, row=row, column=column, colspan=colspan, rowspan=rowspan)
        if value is not None: self.app.setRadioButton(title, value, callFunction=False)
        if trick: self.app.setRadioTick(title, tick=trick)
jarvisteach commented 5 years ago

HI @cristianmarian95 - are you using appJar in ttk mode?

jarvisteach commented 5 years ago

OK, I've looked into this a bit more.

Changing radio buttons is definitely not supported in ttk, or in fact on my test machine (a Mac), so I've introduced a warning when users try, and updated the docs to warn people.

I've also deprecated setRadioTick() as it doesn't actually turn radio buttons into tick boxes, instead turning them into big rectangular buttons. There's now a new function: setRadioSquare which will do the job. Again, docs updated accordingly.