Nov-13-2019, 02:50 PM
Okay well the first mistake is using a Global Variable -- any programmer that has experienced the pain of global variables will tell never use one unless absolutely necessary which means most of the time do not use one no matter how tempting it might seem. Take extra time to figure out how to not make it global as that will save you immense amount of time later on.
To fix your code though delete the entire global statement on line 18 as it is not needed in this context
not knowing Tkinter though I cannot speak to your usage of the Checkbutton's Signal and Slot mechanics if after deleting that line if it still does not seem to work I would strongly suggest you looking into your usage of the Checkbutton's event handling syntax -- either that or perhaps a Tkinter aficionado will chime in
To fix your code though delete the entire global statement on line 18 as it is not needed in this context
self.
anything declared within the __init__
function causes that variable to be available to the ENTIRE class through out the lifetime of that instance of that class object.not knowing Tkinter though I cannot speak to your usage of the Checkbutton's Signal and Slot mechanics if after deleting that line if it still does not seem to work I would strongly suggest you looking into your usage of the Checkbutton's event handling syntax -- either that or perhaps a Tkinter aficionado will chime in