当前位置: 首页>>代码示例>>Python>>正文


Python Entry.focus_next_object_set方法代码示例

本文整理汇总了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()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:68,代码来源:test_focus.py


注:本文中的efl.elementary.entry.Entry.focus_next_object_set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。