|
|
- # Python 3.x
- import tkinter as tk
- import tkinter.font as tkfont
-
- root = tk.Tk()
- root.title("All fonts")
- scroller = tk.Scrollbar(root)
- listbox = tk.Listbox(root,yscrollcommand=scroller.set)
- listbox.pack(side=tk.LEFT)
- scroller.config(command=listbox.yview)
- scroller.pack(side=tk.LEFT,fill=tk.Y)
- for font in sorted(tkfont.families()):
- listbox.insert("end",font)
- root.mainloop()
|