I'm building a script to make a GUI window presenting some functions I made before.
I would like to tick the buttons which I want to run the functions. So far I can run a function by checking the checkbox. But only one.
button1 = ttk.Checkbutton(window,
command = function1
)
But I have several check buttons and at the end 'Run' button to run the all functions checked above.
button1 = ttk.Checkbutton(window,
)
button2 = ttk.Checkbutton(window,
)
button3 = ttk.Checkbutton(window,
)
run_button = ttk.Button(window,
text = 'run',
command = proper command to run the functions ticked above
)
Is there any way to make it possible?
- And plus I would like to close the GUI window once I hit the run button, but couldn't find a solution yet.
Thanks in advance!!
Please check this snippet that performs hardcoded add,subtract,multiply,delete functions.
Edit: Based on the comment, now all functions will run only when you press the run button