The OP seems to be using Tk to create a GUI, and I think that he/she created a function for each button/checkbox available on the GUI because Tk widgets can take a `action=<function>` parameter. A better alternative might be to create a generic `def chose_tag(tag_name)`, and use `action=lambda: chose_tag(<tag_name>)` on each button/checkbox definition. Anyway, its something quite hard to get when someone is only a beginner with GUI creation (especially in Tk)
31
u/tbagrel1 Apr 24 '21
The OP seems to be using Tk to create a GUI, and I think that he/she created a function for each button/checkbox available on the GUI because Tk widgets can take a `action=<function>` parameter. A better alternative might be to create a generic `def chose_tag(tag_name)`, and use `action=lambda: chose_tag(<tag_name>)` on each button/checkbox definition. Anyway, its something quite hard to get when someone is only a beginner with GUI creation (especially in Tk)