本文整理汇总了Python中efl.elementary.entry.Entry.content_set方法的典型用法代码示例。如果您正苦于以下问题:Python Entry.content_set方法的具体用法?Python Entry.content_set怎么用?Python Entry.content_set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.entry.Entry
的用法示例。
在下文中一共展示了Entry.content_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import content_set [as 别名]
def __init__(self):
# main widget 'pointers'
self.tasks_list = None
self.filters = None
self.task_note = None
self.search_entry = None
self.main_panes = None
# the window
StandardWindow.__init__(self, "edone", "Edone")
self.callback_delete_request_add(lambda o: self.safe_quit())
# self.focus_highlight_enabled = True
# main vertical box
vbox = Box(self, size_hint_weight=EXPAND_BOTH)
self.resize_object_add(vbox)
vbox.show()
### Header ###
hbox1 = Box(vbox, horizontal=True)
fr = Frame(vbox, style='outdent_bottom', content=hbox1,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
vbox.pack_end(fr)
fr.show()
# menu button
m = OptionsMenu(hbox1)
hbox1.pack_end(m)
m.show()
# new task button
b = Button(hbox1, text='New Task', focus_allow=False)
b.content = Icon(hbox1, standard='add')
b.callback_clicked_add(lambda b: self.task_add())
hbox1.pack_end(b)
b.show()
# title
title = Label(hbox1, text="Getting Things Done", scale=2.0,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
hbox1.pack_end(title)
title.show()
# search entry
en = Entry(hbox1, single_line=True, scrollable=True,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
en.part_text_set('guide', 'search')
en.callback_changed_user_add(self._search_changed_user_cb)
en.content_set('end', Icon(en, standard='find', size_hint_min=(20,20)))
hbox1.pack_end(en)
en.show()
self.search_entry = en
### Main horizontal box ###
hbox = Box(vbox, horizontal=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
vbox.pack_end(hbox)
hbox.show()
# the filters box widget (inside a padding frame)
self.filters = Filters(hbox)
fr = Frame(hbox, style='pad_medium', content=self.filters,
size_hint_weight=EXPAND_VERT, size_hint_align=FILL_VERT)
hbox.pack_end(fr)
fr.show()
### the main panes (horiz or vert)
panes = Panes(hbox, horizontal=not options.horiz_layout,
content_left_min_relative_size=0.3,
content_right_min_relative_size=0.1,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
panes.content_left_size = 1.0
hbox.pack_end(panes)
panes.show()
self.main_panes = panes
### the tasks list ###
self.tasks_list = TasksList(panes)
panes.part_content_set("left", self.tasks_list)
### the single task view ###
self.task_note = TaskNote(panes)
panes.part_content_set("right", self.task_note)
# show the window
self.resize(800, 600)
self.show()