本文整理汇总了Python中efl.elementary.entry.Entry.focus_next_object_set方法的典型用法代码示例。如果您正苦于以下问题:Python Entry.focus_next_object_set方法的具体用法?Python Entry.focus_next_object_set怎么用?Python Entry.focus_next_object_set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.entry.Entry
的用法示例。
在下文中一共展示了Entry.focus_next_object_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: focus2_clicked
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import focus_next_object_set [as 别名]
def focus2_clicked(obj, item=None):
win = StandardWindow("focus2", "Focus 2", autodel=True, size=(400, 400))
win.focus_highlight_enabled = True
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
PARENT = bx
en = Entry(PARENT, scrollable=True, single_line=True,
text="Entry that should get focus",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bx.pack_end(en)
en.show()
bt = Button(PARENT, text="Give focus to entry")
bt.callback_clicked_add(_focus_obj, en)
bx.pack_end(bt)
bt.show()
ly = Layout(PARENT, size_hint_weight=EXPAND_BOTH)
ly.file = edj_file, "layout"
bx.pack_end(ly)
ly.show()
bt1 = bt = Button(ly, text="Button 1")
ly.part_content_set("element1", bt)
en1 = Entry(ly, scrollable=True, single_line=True,
text="Scrolled Entry that should get focus",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ )
ly.part_content_set("element2", en1)
bt = Button(ly, text="Button 2")
ly.part_content_set("element3", bt)
bt = Button(PARENT, text="Give focus to layout",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_focus_obj, ly)
bx.pack_end(bt)
bt.show()
bt = Button(PARENT, text="Give focus to layout part",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_focus_layout_part, ly)
bx.pack_end(bt)
bt.show()
bt = Button(PARENT, text="Give focus to layout 'Button 1'",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_focus_obj, bt1)
bx.pack_end(bt)
bt.show()
bt = Button(PARENT, text="Give focus to layout 'Entry'",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_focus_obj, en1)
bx.pack_end(bt)
bt.show()
bt.focus_next_object_set(en, ELM_FOCUS_DOWN)
en.focus_next_object_set(bt, ELM_FOCUS_UP)
win.show()