#๐Ÿ”’ customtkinter.TopLevel is not opening on Top

4 messages ยท Page 1 of 1 (latest)

hybrid blaze
#
class AccountsMgr(ctk.CTkToplevel):
    def __init__(self, master, *args, *kwargs):
        super().__init__(master, *args, *kwargs)
        ...

class MainWindow(ctk.CTk):
    def __init__(self, ...):
        ...
        self.account_mgr_btn = ctk.CTkButton(self.btns_frame, text='Account Manager', command=self.open_accounts_mgr)
        ...

    def open_accounts_mgr(self):
        def destroy_instance(_):
            self.account_mgr_btn.configure(state='normal')
            self.account_mgr_instance = None

        if self.account_mgr_instance is None:
            self.account_mgr_instance = AccountsMgr(self)
            self.account_mgr_btn.configure(state='disabled')
            self.account_mgr_instance.bind('<Destroy>', destroy_instance)```when I click the `Account Manager` button it opens the `AccountsMgr` window but it doesn't come on top instead the `MainWindow` stays on top and the `AccountsMgr` gose under it why?
analog stumpBOT
#

@hybrid blaze

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

analog stumpBOT
#

@hybrid blaze

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.