前提・実現したいこと
ウィンドウにLabelを表示させたい。
該当のソースコード
python
1# -*- coding: utf-8 -*- 2 3#====================================================================== 4# ライブラリ 5#====================================================================== 6# GUIを扱う 7import tkinter 8 9#====================================================================== 10# クラス定義 11#====================================================================== 12#---------------------------------------------------------------------- 13# 14#---------------------------------------------------------------------- 15 16#====================================================================== 17# 本体処理 18#====================================================================== 19# インスタンス生成 20window = tkinter.Tk() 21 22# ウィンドウタイトルを決定 23window.title("WORDPRACTICE") 24 25# ウィンドウの大きさを決定 26window.geometry("800x600") 27 28# タイトル出力 29font = ("Helevetice", 32, "bold") 30label = tkinter.Label(window, text="WORDPRACTICE", font=font, bg="red") 31 32# プログラムを始める 33window.mainloop()
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/03/06 11:13
2018/03/06 11:18
2018/03/06 11:20