Adding Images To Your Apps - Intro To Tkinter 5

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2024

ความคิดเห็น • 7

  • @TkinterPython
    @TkinterPython  6 หลายเดือนก่อน +1

    ▶ Watch Intro To Tkinter Playlist ✅ FREE Tkinter Widget Book
    bit.ly/3wwUe21 bit.ly/3K4qlZC
    ▶ See More At: ✅ Subscribe To My TH-cam Channel:
    Tkinter.com bit.ly/3Pk1By4
    ▶ MASSIVE TKINTER.COM DISCOUNT ✅ Join My Facebook Group:
    30% off with coupon code: youtube bit.ly/2GFmOBz
    ▶ Get The Code For This Video
    bit.ly/3dCzz2K

  • @thefambam9305
    @thefambam9305 3 หลายเดือนก่อน

    I installed it exactly how you said but I got an error (import "PIL" could not be resolved from sourcePylancereportMissingModuleSource). It said pillow was successfully installed but when I put from PIL import ImagesTk please help

  • @georgegisgakis8340
    @georgegisgakis8340 6 หลายเดือนก่อน

    Bravo

  • @danielcrompton7818
    @danielcrompton7818 6 หลายเดือนก่อน

    ⚠️⚠️⚠️⚠️⚠️⚠️
    Do NOT make the fatal error of adding the image directly to the label and not saving it to a variable!!
    In The following code the image simply does not display because we have not kept a reference to it and so it is cleared from memory by the garbage collector::
    import tk.PhotoImage, tk.Label, tk.Tk
    root = Tk()
    l = Label(root, image=PhotoImage(file=“img.png”))
    l.pack
    Instead do
    i = PhotoImage(file=“img.png’)
    Label(image=i)

    • @TkinterPython
      @TkinterPython  6 หลายเดือนก่อน

      Isn't that exactly what I suggest in the video?