Created
August 31, 2024 21:30
-
-
Save vigilantPotato/d902e025f3e16a03a443fa82c083191a to your computer and use it in GitHub Desktop.
Difference between message and label widgets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ctypes | |
| import tkinter | |
| if __name__ == "__main__": | |
| ctypes.windll.shcore.SetProcessDpiAwareness(1) | |
| root = tkinter.Tk() | |
| comment = "MessageとLabelの違いを確認する。" | |
| #Message | |
| m = tkinter.Message(root, text=comment, bg="lightblue") | |
| m.pack(pady=1) | |
| #Label | |
| l = tkinter.Label(root, text=comment, bg="lightblue") | |
| l.pack(pady=1) | |
| root.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment