def __init__(self, title, responses, default=None, ok_action=None): self.response = responses[0] self.ok_action = ok_action title = Label(title) self.w_type = ChoiceButton(responses) col = Column([title, self.w_type, Row([Button("OK", action=ok_action or self.dismiss_ok), Button("Cancel", action=ok_action or self.dismiss)], margin=0)], margin=0, spacing=2) Dialog.__init__(self, client=col)
def __init__(self, title, items, **kwds): self.title = title self.items = items self._items = [MenuItem(*item) for item in items] Dialog.__init__(self, **kwds) h = self.font.get_linesize() self.height = h * len(self._items) + h
def __init__(self, title, items, scrolling=False, scroll_items=30, scroll_page=5, handler=None, **kwds): self.handler = handler self.title = _(title, doNotTranslate=kwds.get('doNotTranslate', False)) self.items = items self._items = [ MenuItem(*item, doNotTranslate=kwds.get('doNotTranslate', False)) for item in items ] self.scrolling = scrolling and len(self._items) > scroll_items self.scroll_items = scroll_items self.scroll_page = scroll_page if __builtins__.get("mcenf_tab_to_next"): self._selected_item_index = 0 self._hilited = self._items[self._selected_item_index] Dialog.__init__(self, **kwds) self.root = self.get_root() self.calc_size()
def __init__(self, parent, title=None, fieldvars=None, username='', msg=None): self.Initial_username = username # super's __init__ calls body, which depends on this. Dialog.__init__(self, parent, title, fieldvars, msg=msg)
def __init__(self, type_string, types=map_types_item, ok_action=None): self.type_string = type_string self.ok_action = ok_action title = Label("Choose default data") self.t, widget, self.v = types[type_string] self.n = u"" w_name = TextFieldWrapped(ref=AttrRef(self, 'n')) self.w_value = self.get_widget(widget) col = Column([Column([title,]), Label(_("Item Type: %s")%type_string, doNotTranslate=True), Row([Label("Name"), w_name], margin=0), Row([Label("Value"), self.w_value], margin=0), Row([Button("OK", action=ok_action or self.dismiss_ok), Button("Cancel", action=self.dismiss)], margin=0)], margin=0, spacing=2) Dialog.__init__(self, client=col)
def __init__(self, title, items, scrolling=False, scroll_items=30, scroll_page=5, handler=None, **kwds): self.handler = handler self.title = _(title, doNotTranslate=kwds.get('doNotTranslate', False)) self.items = items self._items = [MenuItem(*item, doNotTranslate=kwds.get('doNotTranslate', False)) for item in items] self.scrolling = scrolling and len(self._items) > scroll_items self.scroll_items = scroll_items self.scroll_page = scroll_page Dialog.__init__(self, **kwds) self.root = self.get_root() self.calc_size()
def __init__(self, title, items, scrolling=False, scroll_items=30, scroll_page=5, **kwds): self.title = _(title) self.items = items self._items = [MenuItem(*item) for item in items] self.scrolling = scrolling and len(self._items) > scroll_items self.scroll_items = scroll_items self.scroll_page = scroll_page Dialog.__init__(self, **kwds) h = self.font.get_linesize() if self.scrolling: self.height = h * self.scroll_items + h else: self.height = h * len(self._items) + h
def __init__(self, title, items, scrolling=False, scroll_items=30, scroll_page=5, **kwds): self.title = _(title) self.items = items self._items = [MenuItem(*item) for item in items] self.scrolling = scrolling and len(self._items) > scroll_items self.scroll_items = scroll_items self.scroll_page = scroll_page Dialog.__init__(self, **kwds) h = self.font.get_linesize() if self.scrolling: self.height = h * self.scroll_items + h else: self.height = h * len(self._items) + h
def __init__(self, title, items, scrolling=False, scroll_items=30, scroll_page=5, handler=None, **kwds): self.handler = handler self.title = _(title) self.items = items self._items = [MenuItem(*item) for item in items] self.scrolling = scrolling and len(self._items) > scroll_items self.scroll_items = scroll_items self.scroll_page = scroll_page Dialog.__init__(self, **kwds) self.root = self.get_root() self.calc_size()
def __init__(self, parent, title = None, fieldvars = None, username='', msg=None): self.Initial_username = username # super's __init__ calls body, which depends on this. Dialog.__init__(self, parent, title, fieldvars, msg=msg)
def __init__(self, title, items, **kwds): self.title = title self.items = items self._items = [MenuItem(*item) for item in items] Dialog.__init__(self, **kwds)
def __init__(self, title, items, **kwds): self.title = title self.items = items self._items = [MenuItem(*item) for item in items] Dialog.__init__(self, **kwds)