tkinter.Tkを継承するclassを作成する。 イニシャライザ第一引数にself、第二引数に可変長引数*args、 第三引数に可変長引数**kwargsを設定する。 class Application(tkinter.Tk): def __init__(self, *args, **kwargs): tkinter.Tk.__init__(self, *args, kwargs) ...
昨年『Tkinterで作る画像編集ソフト』というお題でnoteに連載してました。 先週この画像編集ソフトに機能追加とリファクタリング(gif保存機能の追加とコード整理)の概要を書きましたが、今回はその続きで実装の詳細とテストの話です。 前回のおさらいで ...
プログラミングの腕を磨くために、ゲーム制作に挑戦するのは、とても良い方法だ。なぜなら、ゲームは遊ぶだけではなく、作るのも楽しいので、楽しみながら、プログラミングを覚えることができるからだ。 そのため、Pythonを身につけようと思って ...
y_scroll = tkinter.Scrollbar(frame1, orient=tkinter.VERTICAL, command=canvas.yview) #縦ならVERTICAL、横ならHORIZONTAL y_scroll.pack(side=tkinter.RIGHT, fill="y ...
In this tutorial, we’ll explore how to create and customize a Tkinter window in Python. You’ll learn how to change the window’s title, resize it, set transparency, modify the stacking order, and even ...
So, you probably know that Tkinter has been around forever—we’re talking since 1991. It’s like the grandparent of Python GUIs. And yeah, it’s cool, but sometimes you just want something that feels a ...