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


Python StandardWindow.size方法代码示例

本文整理汇总了Python中efl.elementary.window.StandardWindow.size方法的典型用法代码示例。如果您正苦于以下问题:Python StandardWindow.size方法的具体用法?Python StandardWindow.size怎么用?Python StandardWindow.size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在efl.elementary.window.StandardWindow的用法示例。


在下文中一共展示了StandardWindow.size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: genlist10_clicked

# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import size [as 别名]
def genlist10_clicked(obj, item=None):
    win = StandardWindow("genlist-decorate-item-mode",
        "Genlist Decorate Item Mode", autodel=True, size=(520, 520))

    bx = Box(win, size_hint_weight=EXPAND_BOTH)
    win.resize_object_add(bx)
    bx.show()

    bx2 = Box(win)
    bx2.show()

    fr = Frame(win, text="Decorate Item Mode Type", content=bx2)
    bx.pack_end(fr)
    fr.show()

    rd = Radio(win, size_hint_weight=EXPAND_BOTH, state_value=0,
        text="Slide : Sweep genlist items to the right.")
    rd.show()
    bx2.pack_end(rd)
    rdg = rd

    rd = Radio(win, size_hint_weight=EXPAND_BOTH, state_value=1,
        text = "Rotate : Click each item.")
    rd.group_add(rdg)
    rd.show()
    bx2.pack_end(rd)

    gl = Genlist(win, size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH)
    gl.callback_drag_start_right_add(my_gl_mode_right, rdg)
    gl.callback_drag_start_left_add(my_gl_mode_left, rdg)
    gl.callback_drag_start_up_add(my_gl_mode_cancel, rdg)
    gl.callback_drag_start_down_add(my_gl_mode_cancel, rdg)
    gl.show()

    itc10 = ItemClass10(item_style="default", decorate_item_style="mode")
    itc10.state_get = gl_state_get

    for i in range(1000, 1050):
        GenlistItem(item_class=itc10,
            item_data=i,
            parent_item=None,
            flags=ELM_GENLIST_ITEM_NONE,
            func=gl_sel10,
            func_data=(i, rdg)
            ).append_to(gl)

    bx.pack_end(gl)

    win.size = 520, 520
    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:52,代码来源:test_genlist.py

示例2: cnp_clicked

# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import size [as 别名]
def cnp_clicked(obj):
    win = StandardWindow("copypaste", "CopyPaste", autodel=True)
    if obj is None:
        win.callback_delete_request_add(lambda o: elementary.exit())

    gd = Grid(win, size=(100, 100), size_hint_weight=EXPAND_BOTH)
    win.resize_object_add(gd)
    gd.show()

    en = Entry(win, scrollable=True, line_wrap=ELM_WRAP_CHAR,
        size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH,
        text="Elementary provides ")
    gd.pack(en, 10, 10, 60, 30)
    en.show()

    bt = Button(win, text="Copy from left entry")
    bt.callback_clicked_add(bt_copy_clicked, en)
    gd.pack(bt, 70, 10, 22, 30)
    bt.show()

    bt = Button(win, text="Clear clipboard")
    bt.callback_clicked_add(bt_clear_clicked, en)
    gd.pack(bt, 70, 70, 22, 20)
    bt.show()

    en = Entry(win, scrollable=True, line_wrap=ELM_WRAP_CHAR,
        size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH,
        text="rich copying and pasting functionality,")
    gd.pack(en, 10, 40, 60, 30)
    en.show()

    bt = Button(win, text="Paste to left entry")
    bt.callback_clicked_add(bt_paste_clicked, en)
    gd.pack(bt, 70, 40, 22, 30)
    bt.show()

    lb = Label(win, text="<b>Clipboard:</b>", size_hint_weight=(0.0, 0.0),
        size_hint_align=FILL_BOTH)
    gd.pack(lb, 10, 70, 60, 10)
    lb.show()

    global glb
    glb = Label(win, text="", size_hint_weight=(0.0, 0.0),
        size_hint_align=FILL_BOTH)
    gd.pack(glb, 10, 80, 60, 10)
    glb.show()

    win.size = 480, 200
    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:51,代码来源:test_cnp.py


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