Beginner - switching between files when run Pycharm

Hi everyone,

I’m relatively new to Python and coding in general. In my project when I run this given file, I have a button that, when clicked, opens another file also within my Python project. While this is the desired function, the problem is that it opens the file in a separate pop-up window. What I’m aiming for is a smoother transition, much like you would expect in a typical application, where the new file appears as a new page, and the old page vanishes.

In other words, I want the transition to happen seamlessly, just like switching between pages in a typical application, without the need for a separate pop-up window.

I hope this makes sense. Any insight into what I may be doing wrong would be very much appreciated.

cheers,

Do I just need to add a destroy function, or is there a better way of doing this?

Hey Tom which GUI package are you using?..just an overview, if you want to change between pages you could think of a method/function that will be called such that if you choose page 2 then page 1 closes or the current open file closes and vice versa …