Python !!!Tkinter import tkinter as tk !!メソッド ! .Label() ラベルの作成 * 表示する文字 text="Fraction" {{pre self.label = tk.Label(root, text="Fraction", font=("MS Gothic", 68)) }} ! .Button() ボタンの作成 * ボタンに表示する文字 text="Start" * ボタンを押したらstep1を実行 command=self.step1 {{pre self.button = tk.Button(root, text="Start", font=("MS Gothic", 24), command=self.step1) }} ! .pack() ウィジェットの配置 * 上から下へ順番に配置 * オプション ** side="left" などで上下左右の配置 ** padx=10 でx軸(つまり左右)に10の余白設定 ** pady=20 でy軸(つまり上下)に20の余白の設定 {{pre self.label = tk.Label(root, text="Fraction", font=("MS Gothic", 68)) self.label.pack(pady=50) }} ! .grid() ! .place() ! .Label() ラベルの作成 * 表示する文字 text="Start" {{pre self.button = tk.Button(root, text="Start", font=("MS Gothic", 24), command=self.step1) self.button.pack(pady=20) }} ! .Button() ボタンの作成 * ボタンに表示する文字 text="Start" * ボタンを押したらstep1を実行 command=self.step1 {{pre self.button = tk.Button(root, text="Start", font=("MS Gothic", 24), command=self.step1) self.button.pack(pady=20) }} !!サンプル {{ref fraction.py}}