本文整理汇总了Python中thorpy.elements.clickable.Clickable.set_painter方法的典型用法代码示例。如果您正苦于以下问题:Python Clickable.set_painter方法的具体用法?Python Clickable.set_painter怎么用?Python Clickable.set_painter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thorpy.elements.clickable.Clickable
的用法示例。
在下文中一共展示了Clickable.set_painter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_name_element
# 需要导入模块: from thorpy.elements.clickable import Clickable [as 别名]
# 或者: from thorpy.elements.clickable.Clickable import set_painter [as 别名]
def _get_name_element(self, name):
painter = functions.obtain_valid_painter(painterstyle.DEF_PAINTER,
size=style.SIZE)
el = Clickable(name)
el.set_painter(painter)
el.finish()
return el
示例2: make_image_button
# 需要导入模块: from thorpy.elements.clickable import Clickable [as 别名]
# 或者: from thorpy.elements.clickable.Clickable import set_painter [as 别名]
def make_image_button(img_normal, img_pressed=None, img_hover=None,
alpha=255, colorkey=None, text=""):
e = Clickable(text)
painter = ButtonImage(img_normal, img_pressed, img_hover, alpha, colorkey)
e.set_painter(painter)
e.finish()
return e
示例3: _get_name_element
# 需要导入模块: from thorpy.elements.clickable import Clickable [as 别名]
# 或者: from thorpy.elements.clickable.Clickable import set_painter [as 别名]
def _get_name_element(self, name, namestyle):
painter = functions.obtain_valid_painter(
painterstyle.INSERTER_NAME_PAINTER,
size=style.SIZE)
el = Clickable(name)
el.set_painter(painter)
if namestyle:
el.set_style(namestyle)
el.finish()
return el
示例4: get_launcher_element
# 需要导入模块: from thorpy.elements.clickable import Clickable [as 别名]
# 或者: from thorpy.elements.clickable.Clickable import set_painter [as 别名]
def get_launcher_element(self, name):
size = (style.SIZE[0], style.Y_SMALL_SIZE)
painter = functions.obtain_valid_painter(
painterstyle.BROWSER_LAUNCHER_PAINTER,
size=size)
el = Clickable(name)
el.set_painter(painter)
el.set_style(style.STYLE_BROWSER_LAUNCHER)
el.finish()
return el