So here’s my code What I’m trying to do is have the buttons enabled when the radio buttons are selected. Here’s what I tried. I believe this only sets it initially, and when I select a radio button or change it, it doesn’t update. I think I can use command inside the buttons but don’t understand how to go about
Tag: tkinter
Functions executing out of order?
I have a problem currently that makes no sense to me whatsoever. I am making a program that runs a script on a website using the selenium web driver. This is paired with a GUI I made with Tkinter. In short, I have a “Launch” button in the gui that is set to trigger this function: “script” is an external
Python Tkinter –AttributeError
Cannot seem to figure out the below Tkinter message. Usually doing a quick search will provide answers but this time I seem to miffed the search engines as to what might be causing the below error. Curious to know if I am missing a Python package or line 25 below is used in an older version of Python and it
How to save a tkinter canvas as an image
I would like to save my drawing on a tkinter canvas as an image so I can open it for later use. I currently use this save system from this post however this is not a good way for me. First I would need to add an offset and second if i set the application so only some part of
Writing a function that draws a cube. I can’t manage to make a full cube, just the y axis cube (more info in text)
as the title says, I want to make a program for school that draws rubiks cube. Essentially, user enters size of cube (3×3, 4×4, …) and the program reads the first number of the entered size. So if user writes 3×3, program will read the number ‘3’ at the beginning. From there, the program will run y = canvas.create_polygon(100,cube_y,200,cube_y,200,cube_y2,100,cube_y2, fill
How to assign different URLs to tkinter labels generated in for loop?
Im using a function to generate my labels and each label must open different URLs. So far no matter what text i click it opens the last URL Answer Try the following As per your code example, after you press the “Hello!” button, new labels will be created which contain the URL name and when clicked on will take you
Transferering variable from one function to another without triggering random.choice
I’m very new to python and have gotten stuck on a problem for hours. I’m making a quiz game that picks a random word and you have to answer correctly. When I at first run the code everything i good and working correctly, but after the new_word() function is called the click() function doesn’t update so it ends up being
Can’t not update the textbox when clicked the optionmenu
I’m trying to display my selection in the optionmenu to the textbox. Could anyone help me with this one? when I clicked one option in the optionmenu, the textbox didn’t update. Here is my code. Answer If you run the code in a terminal, then you should see there is exception when an item is selected in the option menu:
How do I center an object on the canvas in Tkinter?
I want to center a circle on the canvas in Tkinter, but I want to combine whatever code does that with mine, without changing it up too much. My program: Is that possible with what I am using currently? Answer You can just draw your circle in the middle of the canvas like this:
Python tkinter How can I created all these Checkbuttons by using a loop?
Is there any way to create all these Checkbuttons “grp_material_1”, “grp_material_2″,”grp_material_…” by using a loop ? I try but got an error that the name (“grp_material_1”, “grp_material_2″…) can not be a variable. I would like to reduce my code of course for a better readability. Thank you ! Answer The simplest thing would be to add all these to a