Python Forum
[Tkinter] Images in Toplevel()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Images in Toplevel()
#5
(Mar-08-2021, 04:39 PM)deanhystad Wrote: Toplevel works the same as the window returned by Tk().

I cannot run your program because it references several files I don't have. I don't want to change every reference (far more than are needed) just so I can test. Your code is 322 lines long! You could make a working program that demonstrates your problem (placing image in a Toplevel window) in a program under 20 lines long. If you want help, you have to do a little work.

I chopped your program down to 12 lines and the source of the problem was immediately obvious. I suggest you take this opportunity to prune your 322 line program into a more appropriately sized example to post. While doing this I am sure you will see the problem too.

You might also consider testing new language features in small programs before including them in your main work. It is usually easier and faster to write a short test program than add code to a large program. Debugging and testing is certainly much faster. Once you have a working example it will be easier for you to integrate the feature with your existing code. Not only do you have a working example to compare against, but you also have a better understanding of how the feature works. A side benefit is you also have a short example you can post if you run into problems.

This code here is part of another program that will be later implemented into.
Reply


Messages In This Thread
Images in Toplevel() - by finndude - Mar-08-2021, 02:16 PM
RE: Images in Toplevel() - by Larz60+ - Mar-08-2021, 02:18 PM
RE: Images in Toplevel() - by finndude - Mar-08-2021, 02:25 PM
RE: Images in Toplevel() - by deanhystad - Mar-08-2021, 04:39 PM
RE: Images in Toplevel() - by finndude - Mar-09-2021, 09:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pass a variable between tkinter and toplevel windows janeik 10 2,381 Jan-24-2024, 06:44 AM
Last Post: Liliana
  [Tkinter] Open tkinter colorchooser at toplevel (so I can select/focus on either window) tabreturn 4 1,928 Jul-06-2022, 01:03 PM
Last Post: deanhystad
  [Tkinter] Toplevel window menator01 5 3,082 Apr-18-2022, 06:01 PM
Last Post: menator01
  [Tkinter] Not able to get image as background in a Toplevel window finndude 4 3,934 Jan-07-2022, 10:10 PM
Last Post: finndude
  Create image on a Toplevel using tkinter ViktorWong 3 7,869 Jun-13-2020, 03:21 PM
Last Post: deanhystad
  [Tkinter] Connect Toplevel Radiobuttons to root Label/Entry widgets iconit 2 2,471 Apr-28-2020, 06:50 AM
Last Post: iconit
  [Tkinter] how can disable menu [About] when Toplevel is active balenaucigasa 0 2,675 Oct-25-2019, 09:49 PM
Last Post: balenaucigasa
  [Tkinter] Toplevel window and global widgets? KevinBrown 3 5,191 Apr-25-2019, 06:02 PM
Last Post: Yoriz
  [Tkinter] Notebook accessing a specific tab using a button from a toplevel frame honestie 8 18,776 Sep-12-2018, 01:51 AM
Last Post: honestie
  [Tkinter] Close Toplevel after clicking button jollydragon 3 10,674 Jul-12-2018, 06:22 AM
Last Post: jollydragon

Forum Jump:

User Panel Messages

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