1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| root = Tk()
root.title("MTG Price Checker")
root.config(width=300)
root.config(height=100)
frame=Frame(root)
frame.pack()
############## Définition des Labels #################
card_name= Label(frame, text="Card Name:").grid(row=1, column=1)
buying_price= Label(frame, text="Buying Price:").grid(row=2, column=1)
mv_url = Label(frame, text="Magic Ville URL:").grid(row=3, column=1)
card_shark_url=Label(frame, text="Card Shark URL:").grid(row=4, column=1)
card_market_url=Label(frame, text="Card Market URL:").grid(row=5, column=1)
########### Définition des entrées labels ############
card_name_entry = Entry(frame, width =20)
buying_price_entry = Entry(frame, width =20)
mv_url_entry = Entry(frame, width =20)
card_shark_entry = Entry(frame, width =20)
card_market_entry = Entry(frame, width =20)
########### Placement des entrées labels ############
card_name_entry.grid(row=1, column=2)
buying_price_entry.grid(row=2, column=2)
mv_url_entry.grid(row=3, column=2)
card_shark_entry.grid(row=4, column=2)
card_market_entry.grid(row=5, column=2)
############## Bouton d'actions ##############
add_button = Button(frame, text="Add \n Card!", command=record_data, height="7")
analyse_button = Button(frame, text="Launch Analyze!", command=analyze, width="20", height="3")
update_button = Button(frame, text="Update \n Card", command=update, height="3")
del_button = Button(frame, text="Del Card", command=del_card,height="3")
quit_button = Button(frame, text="Quit Mtg Analyzer", command=frame.quit, height="3")
############## Placement des boutons d'actions ##############
add_button.grid(row=1,rowspan=5, column=3)
quit_button.grid(row=6, column=3, columnspan=2)
analyse_button.grid(row=6, column=1)
update_button.grid(row=1,rowspan=2, column=4)
del_button.grid(row=3,rowspan=3, column=4) |