本文整理汇总了Python中efl.elementary.popup.Popup.content方法的典型用法代码示例。如果您正苦于以下问题:Python Popup.content方法的具体用法?Python Popup.content怎么用?Python Popup.content使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.popup.Popup
的用法示例。
在下文中一共展示了Popup.content方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ask_what_to_do_next
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import content [as 别名]
def ask_what_to_do_next(self):
pop = Popup(self)
pop.part_text_set('title,text', _('Extract completed'))
box = Box(pop)
pop.content = box
box.show()
lb = Label(pop, text=_('What to do next?'),
size_hint_align=FILL_HORIZ)
box.pack_end(lb)
lb.show()
btn = Button(pop, text=_('Open Filemanager'),
size_hint_align=FILL_HORIZ)
btn.callback_clicked_add(self._open_fm_and_exit_cb)
box.pack_end(btn)
btn.show()
btn = Button(pop, text=_('Open Terminal'),
size_hint_align=FILL_HORIZ)
btn.callback_clicked_add(self._open_term_and_exit_cb)
box.pack_end(btn)
btn.show()
btn = Button(pop, text=_('Close this popup'),
size_hint_align=FILL_HORIZ)
btn.callback_clicked_add(lambda b: pop.delete())
box.pack_end(btn)
btn.show()
btn = Button(pop, text=_('Exit'),
size_hint_align=FILL_HORIZ)
btn.callback_clicked_add(lambda b: self.app.exit())
box.pack_end(btn)
btn.show()
pop.show()
示例2: _popup_build
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import content [as 别名]
def _popup_build(self):
popup = Popup(self.top_widget)
popup.part_text_set('title,text',
'Choose the color for %s' % self._tag_name)
popup.callback_block_clicked_add(lambda p: popup.delete())
cs = Colorselector(popup, color=self._rect.color)
cs.callback_changed_add(lambda s: setattr(rect, 'color', cs.color))
popup.content = cs
rect = Rectangle(popup.evas, color=self._rect.color)
frame = Frame(popup, style='pad_small', content=rect)
popup.part_content_set('button1', frame)
bt = Button(popup, text='Accept')
bt.callback_clicked_add(self._popup_accept_cb, popup, cs)
popup.part_content_set('button2', bt)
bt = Button(popup, text='Cancel')
bt.callback_clicked_add(lambda b: popup.delete())
popup.part_content_set('button3', bt)
popup.show()