Code: Alles auswählen
from Tkinter import*
Fenster=Tk()
Frame = Frame(Fenster, width=100, height=100)
Frame.pack()
def login():
Frame.destroy()
Fenster.geometry('280x280')
Fenster.configure(bg='darkgreen')
Image=PhotoImage(file="minifussball.gif")
Image2=PhotoImage(file="minibasketball.gif")
Image3=PhotoImage(file="minivolleyball.gif")
Image4=PhotoImage(file="minihandball.gif")
b1=Button(Fenster, image=Image, width=100, height=100)
b1.place(x=20,y=20)
b2=Button(Fenster, image=Image2, width=100, height=100)
b2.place(x=150,y=20)
b3=Button(Fenster, image=Image3, width=100, height=100)
b3.place(x=150,y=150)
b4=Button(Fenster, image=Image4, width=100, height=100)
b4.place(x=20,y=150)
Image=PhotoImage(file="tutorial-img-big-2159.gif")
background = Label(Frame, image=Image)
background.pack()
btn=Button(Frame,text='login', command=login, height=2, width=16)
btn.place(x=132,y=100)
e1 = Entry(Frame)
e2 = Entry(Frame)
e1.grid()
e2.grid()
e1.place(x=130,y=70)
e2.place(x=130,y=50)
text1=Label(Frame,text='Benutzername', width=13)
text1.place(x=20,y=50)
text2=Label(Frame,text='Passwort', width=13)
text2.place(x=20,y=70)
text3=Label(Frame,text='Sportergebnisse', height=2, width=35)
text3.place(x=20,y=10)
Fenster.mainloop()