Python Forum
[Tkinter] Locking Canvas to a Window
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Locking Canvas to a Window
#2
The image is being garbage collected because the only reference to image is destroyed as soon as the code returns from view_records.. Try using a global variable or an instance variable instead of the local variable "image" in method "view_records".
Reply


Messages In This Thread
Locking Canvas to a Window - by drnshaw - Jun-05-2020, 02:25 AM
RE: Locking Canvas to a Window - by deanhystad - Jun-05-2020, 02:37 AM
RE: Locking Canvas to a Window - by drnshaw - Jun-05-2020, 02:48 AM
RE: Locking Canvas to a Window - by deanhystad - Jun-05-2020, 03:39 AM
RE: Locking Canvas to a Window - by drnshaw - Jun-06-2020, 03:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 727 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  tkinter window and turtle window error 1885 3 6,832 Nov-02-2019, 12:18 PM
Last Post: 1885
  [Tkinter] Resizing image inside Canvas (with Canvas' resize) Gupi 2 25,208 Jun-04-2019, 05:05 AM
Last Post: Gupi
  update a variable in parent window after closing its toplevel window gray 5 9,223 Mar-20-2017, 10:35 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020