Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After 2 or 3 times stops capturing the press of the [ENTER] and [ESC] keys #71

Open
isghe opened this issue Feb 12, 2025 · 0 comments
Open

Comments

@isghe
Copy link

isghe commented Feb 12, 2025

After 2 or 3 times, the CTkMessagebox stops capturing the press of the [ENTER] and [ESC] keys.
(I am running on Linux with python 3.11.11)

import sys
from CTkMessagebox import CTkMessagebox
import customtkinter as ctk


class App(ctk.CTk):
    def command_new_message_box(self):
        msg = CTkMessagebox(option_focus=1, option_1="OK")
        response = msg.get()
        print({"response": response})

    def __init__(self, in_app_title, in_geometry):
        super().__init__()
        print(sys.version)
        self.frame = ctk.CTkFrame(self)
        self.frame.grid()
        self.button_new_message_box = ctk.CTkButton(
            self.frame, text="new_message_box", command=self.command_new_message_box
        )
        self.button_new_message_box.grid()


if __name__ == "__main__":
    app = App("test_ctkmessagebox", "640x480")
    app.update()
    app.mainloop()

#26

Thanks,
Isidoro Ghezzi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant