Category : tkinter

I am trying to make an image viewer that is split into four frames each of which displays an image separately, I keep getting this error: Traceback (most recent call last): File "c:/Users/EM/Desktop/Scripts/gui/slideshow_model/slide_show_class.py", line 60, in <module> slideshow_model = SlideshowModel(root) File "c:/Users/EM/Desktop/Scripts/gui/slideshow_model/slide_show_class.py", line 22, in __init__ self.frame_1, width=self.grid_w, height=self.grid_height) File "C:UsersEMAppDataLocalProgramsPythonPython37libtkinter__init__.py", line 2098, in __getattr__ ..

Read more

I am not new to python but also not great at it. i am trying to learn Tkinter again as i completely forgot it lol, however i seem to be stuck. You see i have this text adventure game im making and everytime you clikc a button it should root.withdraw() the window and make a ..

Read more

I am trying to get the selected option from the given below OptionMenu, but I am not able to use the selected value globally. def callback(selection): print(selection) return selection yearl=Label(Frame1, text=’Select Year ‘,font=("Helvetica", 10) ).place(relx=-0.3, rely=-1.40) valueyear= [‘2018’, ‘2019’, ‘2020’,’2021′, ‘2022’, ‘2023’] n =StringVar(Frame1) n.set(valueyear[0]) yearchoosen = OptionMenu(Frame1, n, *valueyear, command=callback).place(relx=0.3, rely=-1.45, width=160) In callback ..

Read more

I just want to ask why the previous one works just fine compared the next one, where in fact they are almost just the same except for the 4th line. TIA #….start of 1st …. import tkinter root = tkinter.Tk() root.title("Random_Button_Box v1") e = tkinter.Entry(root, width=50) e.pack() def myClick(): myLabel = tkinter.Label(root, text=e.get()).pack() myButton = ..

Read more