Closed Fefedu973 closed 1 year ago
Hello @Fefedu973 thanks for trying pygubu.
The image is getting garbage collected by python. You have to maintain a reference to the image. Change the image line to:
self.img = img = ImageTk.PhotoImage(Image.open("icon2.png"))
Code generation is not aware of this cases yet. Let me know.
Regards Alejandro A
Tanks it works !!!!?
can i ask you another question ? i want to change text color with a funtion but it doesn't work
idk why my picture dont render ?
!/usr/bin/python3
import tkinter as tk import tkinter.ttk as ttk from tkinter import * from PIL import ImageTk,Image
class AboutApp: def init(self, master=None):
build ui
if name == "main": app = AboutApp() app.run()