当前位置: 首页>>代码示例>>Python>>正文


Python Dialog.__init__方法代码示例

本文整理汇总了Python中dialogs.Dialog.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Dialog.__init__方法的具体用法?Python Dialog.__init__怎么用?Python Dialog.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dialogs.Dialog的用法示例。


在下文中一共展示了Dialog.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from dialogs import Dialog [as 别名]
# 或者: from dialogs.Dialog import __init__ [as 别名]
 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
开发者ID:38115957,项目名称:mcedit,代码行数:9,代码来源:menu.py

示例2: __init__

# 需要导入模块: from dialogs import Dialog [as 别名]
# 或者: from dialogs.Dialog import __init__ [as 别名]
 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)
开发者ID:Nerocat,项目名称:MCEdit-Unified,代码行数:9,代码来源:tree.py

示例3: __init__

# 需要导入模块: from dialogs import Dialog [as 别名]
# 或者: from dialogs.Dialog import __init__ [as 别名]
    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()
开发者ID:BossosaurusRex,项目名称:MCEdit-Unified,代码行数:15,代码来源:menu.py

示例4: __init__

# 需要导入模块: from dialogs import Dialog [as 别名]
# 或者: from dialogs.Dialog import __init__ [as 别名]
    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
开发者ID:TrazLander,项目名称:Traz-Fork-MCEdit-Unified,代码行数:17,代码来源:menu.py

示例5: __init__

# 需要导入模块: from dialogs import Dialog [as 别名]
# 或者: from dialogs.Dialog import __init__ [as 别名]
 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)
开发者ID:scholer,项目名称:labfluence,代码行数:5,代码来源:loginprompt.py

示例6: __init__

# 需要导入模块: from dialogs import Dialog [as 别名]
# 或者: from dialogs.Dialog import __init__ [as 别名]
	def __init__(self, title, items, **kwds):
		self.title = title
		self.items = items
		self._items = [MenuItem(*item) for item in items]
		Dialog.__init__(self, **kwds)
开发者ID:AnnanFay,项目名称:pyge-solitaire,代码行数:7,代码来源:menu.py


注:本文中的dialogs.Dialog.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。