Python Forum
Dual Tkinter windows and shells
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dual Tkinter windows and shells
#2
What are you trying to do? Are you trying to make an application with two windows? That's easy. Creating two windows is barely any more difficult than making one window. The problem you are having with the example is you call tkinter.Tk() twice. You cannot do that. Tk() creates the Tk application, and you can only have one of those.

Calling a function in one module from another is pretty simple. If you want to write your two window application using two files (modules) that should be no problem. If the code for each window is very similar I think you should read about Python classes. You might see significant code reduction and end up not needing two files (modules).
Reply


Messages In This Thread
Dual Tkinter windows and shells - by Astrikor - Aug-31-2020, 08:54 PM
RE: Dual Tkinter windows and shells - by deanhystad - Aug-31-2020, 09:27 PM
RE: Dual Tkinter windows and shells - by Astrikor - Sep-01-2020, 06:59 AM
RE: Dual Tkinter windows and shells - by deanhystad - Sep-01-2020, 02:27 PM
RE: Dual Tkinter windows and shells - by Astrikor - Sep-01-2020, 06:51 PM
RE: Dual Tkinter windows and shells - by deanhystad - Sep-01-2020, 08:20 PM
RE: Dual Tkinter windows and shells - by Astrikor - Sep-03-2020, 10:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  tkinter two windows instead of one jacksfrustration 7 970 Feb-08-2024, 06:18 PM
Last Post: deanhystad
  pass a variable between tkinter and toplevel windows janeik 10 2,538 Jan-24-2024, 06:44 AM
Last Post: Liliana
  Tkinter multiple windows in the same window tomro91 1 926 Oct-30-2023, 02:59 PM
Last Post: Larz60+
  [Tkinter] DUAL WINDOWS... ATARI_LIVE 5 3,076 Sep-27-2020, 11:35 AM
Last Post: ATARI_LIVE
  Tkinter scaling windows conten to or with its size not working Detzi 5 4,560 Jan-12-2020, 12:42 PM
Last Post: Detzi
  How to close one of the windows in Tkinter scratchmyhead 3 4,868 Dec-21-2019, 06:48 PM
Last Post: pashaliski
  Using tkinter on Windows to launch python 3 scripts Mocap 1 2,779 Jul-17-2019, 05:16 AM
Last Post: Yoriz
  [Tkinter] Using tkinter and mutiprocess ok on windows, locks up on ubuntu? ice 3 2,745 May-29-2019, 08:44 AM
Last Post: ice
  Int Variables in different Tkinter windows only returning 0 harry76 3 4,207 May-26-2019, 10:24 AM
Last Post: Yoriz
  [Tkinter] Ignore windows scaling in tkinter Gangwick 2 4,502 Jul-23-2018, 02:41 PM
Last Post: Gangwick

Forum Jump:

User Panel Messages

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