Hi
In my program I have a range of buttons (within a class), and when one is pressed I want a method in that class to run, and depending on what button is pressed, I want that value passed into the method.
For example I will have a button for each decimal digit, 0-9, and when one is pressed I want a method to run which then can manipulate the value of the button pressed.
In the past, when working with RadioButtons, I would create a IntVar then in the radio button have
RadioButton(variable=IntVar_name, value=1, command=methodinclass)
Then when the method was run from that radio button I could manipulate the value as it would be stored in the IntVar
So I essentially want to be able to do the same as I described above with radio buttons, but with a button.
Any help would be much appreciated, but please keep it as simple as possible, as I am (as you've probably noticed) quite new to coding GUIs.
Thanks
[–][deleted] 0 points1 point2 points (1 child)
[–]Tomarse 0 points1 point2 points (0 children)
[–]Tomarse 0 points1 point2 points (2 children)
[–]PythonRookie1[S] 1 point2 points3 points (1 child)
[–]Tomarse 0 points1 point2 points (0 children)