Skip to content
Advertisement

How to display image with upload button in and resize it with window resize (Dynamically)with Tkinter python, I need to add upload button

I need to add upload button so that I can upload the picture and display with this class. Everything working but when I am adding the upload button its giving me some error and my code is not wokring.

JavaScript

Advertisement

Answer

Create the Button widget within the class constructor and bind it with self.loadbackground. Also, you don’t need to recreate the Label widget every time instead use label.configure(image=yourimage).

Here is the code:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement