Skip to content

Instantly share code, notes, and snippets.

@vigilantPotato
Created August 31, 2024 21:30
Show Gist options
  • Select an option

  • Save vigilantPotato/d902e025f3e16a03a443fa82c083191a to your computer and use it in GitHub Desktop.

Select an option

Save vigilantPotato/d902e025f3e16a03a443fa82c083191a to your computer and use it in GitHub Desktop.
Difference between message and label widgets
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