Monday, February 22, 2016

Tkinter check boxes

Tkinter doesn't have widgets that look like switches like Labview or anything, but apparently most OS's can be counted on to have check boxes so that's a thing in Tkinter. Either I'm finally getting used to this or it's' pretty easy to find useful examples on how to define checkboxs and how to grey them out:

Basic man page. In the examples the author seems to like the grid manager, but pack works just fine: http://www.python-course.eu/tkinter_checkboxes.php

A reminder to use an IntVar to return the status of the checkbox: http://stackoverflow.com/questions/16285056/get-the-input-from-a-checkbox-in-python-tkinter

A compact man page with nice lists of parameters and methods, including disable. http://www.tutorialspoint.com/python/tk_checkbutton.htm

A similar page for buttons showing how you can use the same settings to grey them out too: http://www.tutorialspoint.com/python/tk_button.htm