stevewilliams024

Help with Opening GIF Images by Clicking Button on Horoscope Program

Discussion created by stevewilliams024 on Nov 15, 2013
Latest reply on Nov 18, 2013 by SWalbridge-esristaff
I need help with the button action for this code. When you click on the button, a new window should open with the GIF image of the horoscope sign. The name of the GIF image files are "Pisces.gif", "Taurus.gif",etc.






from Tkinter import * #Call all modules for TKinter in order to make GUI.

app = Tk() #Define a variable for the TKinter interface.
app.title("Horoscope") #Apply GUI title
app.geometry("500x3000") #Size of window.

button1=Button(app, text="January 20-Febuary 18",width=20)
button1.pack(padx=15,pady=15)

button2=Button(app, text="February 19-March 20",width=20)
button2.pack(padx=15,pady=15)

button3=Button(app, text="March 21-April 19",width=20)
button3.pack(padx=15,pady=15)

button4=Button(app, text="April 20-May 20",width=20)
button4.pack(padx=15,pady=15)

button5=Button(app, text="May 21-June 20",width=20)
button5.pack(padx=15,pady=15)

button6=Button(app, text="June 21-July 22",width=20)
button6.pack(padx=15,pady=15)

button7=Button(app, text="July 23-August 22",width=20)
button7.pack(padx=15,pady=15)

button8=Button(app, text="August 23-September 22",width=20)
button8.pack(padx=15,pady=15)

button9=Button(app, text="September 23-October 22",width=20)
button9.pack(padx=15,pady=15)

button10=Button(app, text="October 23-November 21",width=20)
button10.pack(padx=15,pady=15)

button11=Button(app, text="November 22-December 21",width=20)
button11.pack(padx=15,pady=15)

button12=Button(app, text="December 22-January 19",width=20)
button12.pack(padx=15,pady=15)

app.mainloop() #Final input for making GUI

Outcomes