本文整理汇总了Python中efl.elementary.button.Button.tooltip_move_freeze_push方法的典型用法代码示例。如果您正苦于以下问题:Python Button.tooltip_move_freeze_push方法的具体用法?Python Button.tooltip_move_freeze_push怎么用?Python Button.tooltip_move_freeze_push使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.button.Button
的用法示例。
在下文中一共展示了Button.tooltip_move_freeze_push方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tooltip_clicked
# 需要导入模块: from efl.elementary.button import Button [as 别名]
# 或者: from efl.elementary.button.Button import tooltip_move_freeze_push [as 别名]
#.........这里部分代码省略.........
timer.delete()
del data["timer"]
obj.text_set("Icon tooltip, click to start changed timed")
return
data["timer"] = timer_add(1.5, _tt_icon_replace_timer_cb, obj, data)
obj.text_set("Icon tooltip, click to stop changed timed")
bt = Button(win, text="Icon tooltip, click to start changed timed")
bt.tooltip_content_cb_set(_tt_icon)
data = dict()
bt.callback_clicked_add(_tt_icon_replace_timed, data)
bx.pack_end(bt)
bt.show()
bt.on_del_add(_tt_timer_del, data)
bt = Button(win, text="Transparent Icon tooltip")
bt.tooltip_content_cb_set(_tt_icon, None)
bt.tooltip_style_set("transparent")
bx.pack_end(bt)
bt.show()
def _tt_style_replace_timer_cb(obj, data):
value = data.get("value")
data["value"] = not value
if value:
obj.tooltip_style_set()
else:
obj.tooltip_style_set("transparent")
return True
def _tt_style_replace_timed(obj, data, *args, **kargs):
timer = data.get("timer")
if timer:
timer.delete()
del data["timer"]
obj.text_set("Icon tooltip style, click to start changed timed")
return
data["timer"] = timer_add(1.5, _tt_style_replace_timer_cb, obj, data)
obj.text_set("Icon tooltip, click to stop changed timed")
bt = Button(win, text="Icon tooltip style, click to start changed timed")
bt.tooltip_content_cb_set(_tt_icon, None)
data = dict()
bt.callback_clicked_add(_tt_style_replace_timed, data)
bx.pack_end(bt)
bt.show()
bt.on_del_add(_tt_timer_del, data)
def _tt_visible_lock_toggle(obj, data, *args, **kargs):
value = data.get("value")
data["value"] = not value
if value:
obj.text_set("Unlocked tooltip visibility");
obj.tooltip_hide()
else:
obj.text_set("Locked tooltip visibility");
obj.tooltip_show()
bt = Button(win, text="Unlocked tooltip visibility");
bt.tooltip_text_set(
"This tooltip is unlocked visible,<br> click the button to lock!")
data = dict()
bt.callback_clicked_add(_tt_visible_lock_toggle, data)
bx.pack_end(bt)
bt.show()
def _tt_move_freeze_toggle(obj, *args, **kargs):
if obj.tooltip_move_freeze_get():
obj.text_set("Unfreezed tooltip movement");
obj.tooltip_move_freeze_pop()
else:
obj.text_set("Freezed tooltip movement");
obj.tooltip_move_freeze_push()
bt = Button(win, text="Freezed tooltip movement");
bt.tooltip_text_set(
"This tooltip has freezed movement,<br> click the button to unfreeze!")
bt.tooltip_move_freeze_push()
bt.callback_clicked_add(_tt_move_freeze_toggle)
bx.pack_end(bt)
bt.show()
en = Entry(win, scrollable=True, single_line=True,
entry="Hello, some scrolled entry here!", size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
en.tooltip_text_set("Type something here!")
bx.pack_end(en)
en.show()
lst = List(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH,
size_hint_min=(100, 100))
li = lst.item_append("Hello")
li.tooltip_text_set("Something useful here?")
li = lst.item_append("Icon Tooltip")
li.tooltip_content_cb_set(_tt_item_icon, None)
bx.pack_end(lst)
lst.go()
lst.show()
win.show()