akbarbasya26

Tkinter2

Sep 22nd, 2020
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from tkinter import *
  2.  
  3. root = Tk()
  4. root.title("Kelompok 6")
  5. # list
  6. list_anggota = {
  7.     'Izzeldin Addarda': '41519010045',
  8.     'Akbar Basyarudin': '41519010046',
  9.     'Ridho Aditya N': '41519010050'
  10. }
  11. # frame ke 2
  12. teks = ""
  13. i = 0
  14. while i < len(list_anggota):  # create teks body
  15.     val = list(list_anggota.items())[i]
  16.     teks += "Anggota ke {} {}, {}\n".format(str(i + 1), str(val[0]), str(val[1]))
  17.     i += 1
  18. frame2 = LabelFrame(root, text="Kelompok 6 : ", bd=8, bg="white")
  19. Label(frame2, text=teks, fg='green', bg='white').pack()
  20. frame2.pack(expand=YES, fill=BOTH)
  21.  
  22. # Quit Button
  23. Button(text="QUIT", fg="blue", command=root.destroy).pack(side=BOTTOM)
  24.  
  25. mainloop()
RAW Paste Data