Python Tkinter - how to block a pop-up unnecessary window?

Viewed 22

I have a question - how to disable the window, I've run out of ideas :/.

  • the purpose of the code is to position the module from the import Progress().get_run_progress_bar()

  • I have a helper variable - I open a window new_window which I overwrite and then I can position this one

The problem is that when running the code, the new_window opens for a while (sometimes it crashes and stays), and then the window proper: Progress(new_window).get_run_progress_bar()

How to rewrite this code so that it does not open the new_window but immediately, Progress(new_window).get_run_progress_bar()

Thank you very much for your help.

    def get_analyze(self):
        new_window = tk.Tk()
        self.after(10, lambda: Progress(new_window).get_run_progress_bar())
        new_window.geometry("+%d+%d" % (25, 100))
0 Answers
Related