Python Forum
[Tkinter] image doesnt exists into personal module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] image doesnt exists into personal module
#5
OK, i found a solution :

Into 'window_about.py', i used for the def __init__(), a tk.Toplevel, and after i can use the object 'self.img_logo':

class gui(tk.Tk):
    ''' Display a GUI for window about'''

    def __init__(self, parent, init):
        tk.Toplevel.__init__(self, parent)
        self.parent = parent

(...)
    def ui(self):
        '''Displaying UI'''
        # Frame for service informations
        frm_service = ttk.Frame(self)
        frm_service.grid(row=7, column=1)

        ## Add an image logo
        img_service = ttk.Label(frm_service, image=self.logo)
        img_service.grid(row=0, column=0, rowspan=2)
Problem resolved!
Reply


Messages In This Thread
RE: image doesnt exists into personal module - by PyForIO - Mar-13-2018, 02:11 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020