i have 2 python file TestBtnImage1.py and TestBtnImage2.py
I am trying to call display() fucntion of TestBtnImage2 on button click of TestBtnImage1.py, button without image displying in frame, however button with image is not displying. thanks in advance
TestBtnImage1.py
from tkinter import *
from TestBtnImage1 import *
frame = Tk()
frame.title("TextBox Input")
frame.geometry('200*200')
frame.config(background="blue")
printButton = Button(frame, text="click me", command=display()).place(x=50, y=50)
frame.mainloop()
TestBtnImage2.py
from tkinter import *
def display():
frame = Tk()
frame.title("TextBox Input")
frame.geometry('200*200')
frame.config(background="blue")
logo1 = PhotoImage(file="cheta.png")
Button(gui, text="click me", image=logo1, bg="blue", relief=FLAT).place(x=100, y=200)
frame.mainloop()
tried googling for the same issue also stackoverflow but no help.