本文整理汇总了Python中efl.elementary.entry.Entry.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Entry.__init__方法的具体用法?Python Entry.__init__怎么用?Python Entry.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.entry.Entry
的用法示例。
在下文中一共展示了Entry.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import __init__ [as 别名]
def __init__(self, parent, text=None, icon=None):
Entry.__init__(self, parent, scrollable=True, single_line=True,
size_hint_expand=EXPAND_BOTH,
size_hint_fill=FILL_BOTH)
self.show()
if text: self.text = text
if icon: self.icon = icon
ic = SafeIcon(self, 'go-down')
ic.size_hint_min = 16, 16 # TODO file a bug for elm on phab
ic.callback_clicked_add(self.activate)
self.part_content_set('end', ic)
self._itc = GenlistItemClass(item_style='default',
text_get_func=self._gl_text_get,
content_get_func=self._gl_content_get)
self._list = Genlist(self)
self._list.callback_selected_add(self._list_selected_cb)
self._hover = Hover(self.parent, target=self)
self._bg = Background(self, size_hint_expand=EXPAND_BOTH,
size_hint_fill=FILL_BOTH)
fr = Frame(self, style='pad_medium',
size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH)
fr.content = self._list
fr.show()
self._table = Table(self, size_hint_expand=EXPAND_BOTH,
size_hint_fill=FILL_BOTH)
self._table.pack(self._bg, 0, 0, 1, 1)
self._table.pack(fr, 0, 0, 1, 1)
self._selected_func = None
示例2: __init__
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import __init__ [as 别名]
def __init__(self, parent):
self.task = None
Entry.__init__(self, parent, scrollable=True, disabled=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
self.part_text_set('guide', self.GUIDE1)
self.callback_clicked_add(self._clicked_cb)
self.callback_unfocused_add(self._unfocused_cb)
self.show()
示例3: __init__
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import __init__ [as 别名]
def __init__(self, win):
self.win = win
Entry.__init__(self, win, single_line=True,
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
self.callback_clicked_add(self._click_cb)
self.callback_activated_add(self._done_cb, save=True)
self.callback_unfocused_add(self._done_cb, save=False)
self.callback_aborted_add(self._done_cb, save=False)
self.go_passive()
示例4: __init__
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import __init__ [as 别名]
def __init__(self, app):
self.app = app
Entry.__init__(self, app.win, single_line=True,
text='No repository loaded',
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
self.callback_clicked_add(self._click_cb)
self.callback_activated_add(self._done_cb, save=True)
self.callback_unfocused_add(self._done_cb, save=False)
self.callback_aborted_add(self._done_cb, save=False)
self.go_passive()
示例5: __init__
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import __init__ [as 别名]
def __init__(self, parent):
wrap = ELM_WRAP_MIXED if options.diff_text_wrap else ELM_WRAP_NONE
Entry.__init__(self, parent,
scrollable=True, editable=False, line_wrap=wrap,
text="<info>Loading diff, please wait...</info>",
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
示例6: __init__
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import __init__ [as 别名]
def __init__(self, canvas, *args, **kwargs):
Entry.__init__(self, canvas, *args, **kwargs)
self.scrollable = True