Python Form: Using Tkinter --> Run Script Based On Checked Checkboxes In Gui
I have created the following checkbox popup in Python 3.5 using tkinter (see image) with the following code: from tkinter import * class Checkbar(Frame): def __init
Solution 1:
The problem is that your Checkbar
class has no __getitem__
method so lng[1]
will trigger an error. To do lng[1] == 1
without errors, just add the following method to you rCheckbar
class:
def__getitem__(self, key):
return self.vars[key].get()
That way lng[i]
will return the value of the i-th IntVar
of the Checkbar
Post a Comment for "Python Form: Using Tkinter --> Run Script Based On Checked Checkboxes In Gui"