本文整理汇总了Python中efl.elementary.entry.Entry.callback_focused_add方法的典型用法代码示例。如果您正苦于以下问题:Python Entry.callback_focused_add方法的具体用法?Python Entry.callback_focused_add怎么用?Python Entry.callback_focused_add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.entry.Entry
的用法示例。
在下文中一共展示了Entry.callback_focused_add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: focus3_clicked
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import callback_focused_add [as 别名]
def focus3_clicked(obj, item=None):
win = StandardWindow("focus3", "Focus 3", autodel=True, size=(320, 480))
win.focus_highlight_enabled = True
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
en = Entry(win, scrollable=True, single_line=True, text="An entry",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
en.callback_focused_add(_focused_cb)
en.callback_unfocused_add(_unfocused_cb)
bx.pack_end(en)
en.show()
bt = Button(win, text="Add", focus_allow=False,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_add_cb, win, bx)
bx.pack_end(bt)
bt.show()
bt = Button(win, text="Del", focus_allow=False,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_del_cb, bx)
bx.pack_end(bt)
bt.show()
bt = Button(win, text="hide", focus_allow=False,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_hide_cb)
bx.pack_end(bt)
bt.show()
win.show()
示例2: _add_cb
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import callback_focused_add [as 别名]
def _add_cb(bt, win, bx):
en = Entry(win, scrollable=True, single_line=True, text="An entry",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
en.callback_focused_add(_focused_cb)
en.callback_unfocused_add(_unfocused_cb)
bx.pack_start(en)
en.show()