Having a horrible time learning Tkinter, and it seems to me as though when you make a button execute a function ...command=do_this), that command cannot have any parameters, it can only execute a function.
I would like to pass a parameter to do_this() to give it functionality depending on the input, like do_this(parameter). However the command functionality of a button does not use the brackets at the end of the function name and doesn't seem to support parameters.
How do I get around this? The intended use of the program is to generate a frequency histogram based on different groups of data from a csv file, where the groups are selected via a listbox, then the histogram is generated by pressing a button.
In the call of your widget, insert
command=lambda parameter1=value,parameter2=value,etc:name(parameters)
For example, if u want a button to execute a function do_this(a)
with paramter a set to 5 it's
command=lambda a=5:do_this(a)
Pass a parameter from a listbox/button to a function in Tkinter