Guest User

Untitled

a guest
Aug 14th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import tkinter
  2. import tkinter.font as font
  3.  
  4. root = tkinter.Tk()
  5. root.title("Hello Tkinter World.")
  6. root.geometry("600x500+100+100")
  7.  
  8. #ここから追加
  9. labelFont = font.Font(size=30,weight="bold")#テキストのフォントを定義
  10. label = tkinter.Label(root,text="This is test window!!!",font=labelFont)#表示するテキストの定義
  11. label.pack(anchor="center",expand=1)#テキストの配置
  12.  
  13.  
  14. root.mainloop()#画面表示
Add Comment
Please, Sign In to add comment