I'm creating a splash screen that will be the introduction to my program. I have managed to place an image on the screen but as soon as I add a button nothing comes up, not even the tkinter
window.
What I'm trying to do is have an image on the top of the window, under it a text box with my name "Bob Johns" then another button that says "Enter"
, which will take the user to another section of the program (i.e. start the application). All of this aligned to the centre.
Here's what I have so far:
from Tkinter import *
from PIL import ImageTk, Image
import os
#create the window
root = Tk()
#modify root window
root.title("Labeler")
root.geometry("500x500")#Width x Height
img = ImageTk.PhotoImage(Image.open("test.gif"))
panel = Label(root, image = img)
panel.pack(side = "bottom", fill = "both", expand = "yes")
#If i add this section the program goes awol--------------
app = Frame(root)
app.grid()
button1 = Button(app, text = "This is a button")
button1.grid()
#---------------------------------------------------------
#Start the event loop
root.mainloop()