tkinter.checkbutton

Save changed textbutton state back to dictionary value list index 0

非 Y 不嫁゛ 提交于 2021-01-29 10:11:58
问题 Good Day. I have managed to load a dictionary from a text file with this code: def loadDictFile(data_folder): critDict = json.loads(open(data_folder+'critDict3.txt').read()) print('json_data is', critDict) return critDict And I can create a tkinter UI with checkboxes that are on or off according to the dictionary values using the following code: def makeUI(data_folder, critDict): top = Tk() varList=[] for key, val in critDict.items(): myVar = IntVar()#create intVar for this checkbutton

Why are these Python tkinter checkbuttons linked?

坚强是说给别人听的谎言 提交于 2020-06-07 05:53:28
问题 I'm currently trying to create a GUI to compare files between two different folders and have a rudimentary framework that I'm trying to build off of right now. I have three frames on the left, right, and bottom of the window with two checkbuttons each. I want to be able to select each checkbutton independently of each other but every time I click on the first checkbutton of any one of the frames, the first checkbutton for the other frames also selects/deselects at the same time. Why is this