Jul-30-2023, 12:55 PM
ny help to get the proper syntax regarding zoom. (great confusion in tha family).
Anyone?
Anyone?
lblzoomlvl = customtkinter.CTkLabel(window, width=80, font=("Ariel",16,"bold"),text_color="#0000ff", fg_color="#ffffff", text="") lblzoomlvl.place(x=1160,y=241) def cmdinczoom(event): #read Text from label lblzoomlvl into an integer variable zoom temp = lblzoomlvl["text"] zoom =int(temp) if (zoom<16): # add 1 to int variable zoom zoom=zoom+1 # update text on label lblzoomlvl lblzoomlvl.configure(text=zoom) # set mouse x,y position mouse.position = (32,53) # click once with left mouse button mouse.click(Button.left,1) # update text on lblzzoom by zoom lblzoomlvl.configure(text=zoom) btninczoom = customtkinter.CTkButton(window, width=20, height=10, font=("Ariel",20,"bold"), border_color="#add19e", fg_color="#aaaaaa",text_color="#000000", text="+",command=cmdinczoom) lblzoomlvl.[output]Tk.bind("<Up>",cmdinczoom) File "D:\Python311\Lib\tkinter\__init__.py", line 1448, in bind return self._bind(('bind', self._w), sequence, func, add) ^^^^^^^^^^ AttributeError: 'str' object has no attribute '_bind'. Did you mean: 'find'? PS C:\Users\jan-e> & D:/Python311/python.exe d:/Python311/Scripts/nye.py PS C:\Users\jan-e> & D:/Python311/python.exe d:/Python311/Scripts/nye.py PS C:\Users\jan-e> & D:/Python311/python.exe d:/Python311/Scripts/nye.py PS C:\Users\jan-e> [/output]bind("<Up>",cmdinczoom)