Skip to content

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

Description

@isghe

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions