Category : tkinter

I have a problem that i really cannot solve. It’s been hours of searching. I have this simple tkinter window with one combobox, one figure on a FigureCanvasTkAgg and a Matplotlib TextBox. The thing is that i want to print something on console when i press Enter (on the TextBox). I do this by using ..

Read more

I’m making a project using tkinter but am having some trouble with using the grid method i’m trying to place all the pictures on the right side of the screen,but its just not working here is the code i’ve written: lemon_picture.grid(row=0,column=10,sticky=W) melon_picture.grid(row=1,column=10,sticky=W) DragonFruit_picture.grid(row=2,column=10,sticky=W) And here’s the output i get: https://i.stack.imgur.com/GV1kn.png As far as i’ve tried ..

Read more

My normal script is called start.py The code is this: inp = input("Select:") if inp == ‘1’: print("1") elif inp == ‘2’: print("2") else: print("error") now I got a tkinter window that I want to start with the input script together. Now my code looks like this: os.system("python tkinterwindow.py") inp = input("Select:") if inp == ..

Read more

I have this Tkinter code is_flag1 = True is_flag2 = False def xyz(intVar): if intVar.get() == 1: #change… else: #change… var_checkbutton1 = tk.IntVar() var_checkbutton2 = tk.IntVar() tk.Checkbutton(master, text="flag1", variable=var_checkbutton1, onvalue=1, offvalue=0, command=xyz).pack() tk.Checkbutton(master, text="flag2", variable=var_checkbutton2, onvalue=1, offvalue=0, command=xyz).pack() I want to make xyz() that change is_flag1 when I click on checkbutton flag1 or is_flag2 when ..

Read more

On Python Tkinter I have the following code for creating a Menu with only 2 menu items: my_menu = Menu(root, tearoff=False) my_menu.add_command(label="Show details", command=whatever) my_menu.add_command(label="Delete me", command=something) Now I want to add an If Statement to check if the menu item: Delete me exists in menu or not. If exists, delete that menu item (like ..

Read more