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)
def __init__(self, text="", window=None, textcolor=None,batch=None, group=None, width=None, theme=None, on_escape=None, have_focus=False,font_size=None): def on_ok(_): if on_escape is not None: on_escape(self) self.delete() #button = FocusButton("Ok", on_press=on_ok) button=HighlightedButton("Ok",on_release=on_ok,height=35,width=80) Manager.__init__(self, content=Frame(VerticalContainer( [Label(text,color=textcolor,font_size=font_size,width=width,multiline=True), Spacer(min_height=5),button])), window=window, batch=batch, group=group, theme=theme, is_movable=True) Manager.set_next_focus(self, 1)
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)