You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
383 B

4 years ago
  1. # Python 3.x
  2. import tkinter as tk
  3. import tkinter.font as tkfont
  4. root = tk.Tk()
  5. root.title("All fonts")
  6. scroller = tk.Scrollbar(root)
  7. listbox = tk.Listbox(root,yscrollcommand=scroller.set)
  8. listbox.pack(side=tk.LEFT)
  9. scroller.config(command=listbox.yview)
  10. scroller.pack(side=tk.LEFT,fill=tk.Y)
  11. for font in sorted(tkfont.families()):
  12. listbox.insert("end",font)
  13. root.mainloop()