Oct-23-2022, 06:59 PM
Hey,
a couple comments on your code:
In python classes use the self instance, using self instead of root will allow you to eliminate the global variables. the use of self in classes
when you created the label in the init:
it can be configured-
a couple comments on your code:
In python classes use the self instance, using self instead of root will allow you to eliminate the global variables. the use of self in classes
when you created the label in the init:
root.up_window_label = tk.Label(image=root.img_show)you recreate it in your function: def load_image(root):
it can be configured-
self.up_window_label.config(image= self.new_img)finally instead of creating canvas windows for each button and label you can use place for exact placement.
self.headline_label = tk.Label(self.canvas,text="IMAGE PROCESSING", bg='azure3') self.headline_label.place(x=80,y=20)