-1

I am currently working on a project using Python and tkinter.

The problem is that I don't know what's the proper way to display multiple windows, or screens, I don't know how to call them. Let me explain better.

When the application starts the login screen appears. After that, if I click register, I want to go to the register screen, but I don't want it to be a separate window (I don't want to have 2 windows displayed at the same time), but rather another window with different content ?!

How should I handle properly this situation? Create a second window using Toplevel and hiding the first (can I do that?) or changing the widgets of the first?

Code I've written so far

drobert
  • 1
  • 3

1 Answers1

0

You can do that- just call window.withdraw() on the Toplevel you need to hide after creating a new Toplevel. Changing the widgets in the first is also an option- if you like, you could always try a Notebook widget and disable manual flipping or just put each "screen" in a frame and grid_ or pack_forget them to remove them from the window.

Delioth
  • 1,564
  • 10
  • 16