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


Python Button.part_content_set方法代码示例

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


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

示例1: transit_clicked

# 需要导入模块: from efl.elementary.button import Button [as 别名]
# 或者: from efl.elementary.button.Button import part_content_set [as 别名]
def transit_clicked(obj, item=None):
    win = StandardWindow("transit", "Transit")
    win.autodel = True

    bx = Box(win)
    bx.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
    win.resize_object_add(bx)
    bx.size_hint_min = 318, 318
    bx.show()

    ic = Image(win, file=os.path.join(img_path, "icon_11.png"),
        size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))

    bt = Button(win, text="ImageAnimation Effect")
    bt.part_content_set("icon", ic)
    bx.pack_end(bt)
    bt.show()
    ic.show()
    bt.callback_clicked_add(transit_image_animation, ic)

    bt = Button(win, text="Color, Rotation and Translation")
    bx.pack_end(bt)
    bt.show()
    bt.callback_clicked_add(transit_rotation_translation_color)

    bt = Button(win, text="Wipe Effect")
    bx.pack_end(bt)
    bt.show()
    bt.callback_clicked_add(transit_wipe)

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:33,代码来源:test_transit.py

示例2: transit6_clicked

# 需要导入模块: from efl.elementary.button import Button [as 别名]
# 或者: from efl.elementary.button.Button import part_content_set [as 别名]
def transit6_clicked(obj, item=None):
    win = StandardWindow("transit6","Transit 6", autodel=True, size=(300, 300))

    ic = Image(win, file=os.path.join(img_path, "rock_01.jpg"),
        size_hint_max=(50, 50))

    bt = Button(win, text="Before Button - Fade Effect", pos=(25, 125),
        size=(250, 50))
    bt.part_content_set("icon", ic)
    bt.show()

    ic = Image(win, file=os.path.join(img_path, "rock_02.jpg"),
        size_hint_max=(50, 50))

    bt2 = Button(win, text="After Button - Fade Effect", pos=(25, 125),
        size=(250, 50))
    bt2.part_content_set("icon", ic)

    win.show()

    bt.callback_clicked_add(transit_fade, bt2)
    bt2.callback_clicked_add(transit_fade, bt)
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:24,代码来源:test_transit.py


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