示例#1
0
    def __init__(self, text="", window=None, batch=None, group=None,
                 theme=None, on_escape=None, have_focus=False):
        def on_ok(_):
            if on_escape is not None:
                on_escape(self)
            self.delete()

        button = FocusButton("Ok", on_press=on_ok)
        Manager.__init__(self, content=Frame(VerticalContainer(
                         [Label(text), button])),
                         window=window, batch=batch, group=group,
                         theme=theme, is_movable=True)
        Manager.set_next_focus(self, 1)