本文整理汇总了Python中thorpy.elements.clickable.Clickable.set_style方法的典型用法代码示例。如果您正苦于以下问题:Python Clickable.set_style方法的具体用法?Python Clickable.set_style怎么用?Python Clickable.set_style使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thorpy.elements.clickable.Clickable
的用法示例。
在下文中一共展示了Clickable.set_style方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_name_element
# 需要导入模块: from thorpy.elements.clickable import Clickable [as 别名]
# 或者: from thorpy.elements.clickable.Clickable import set_style [as 别名]
def _get_name_element(self, name):
painter = functions.obtain_valid_painter(painterstyle.NAME_PAINTER,
size=style.SIZE)
el = Clickable(name)
el.set_painter(painter)
el.set_style(style.STYLE_NAME)
el.finish()
return el
示例2: get_launcher_element
# 需要导入模块: from thorpy.elements.clickable import Clickable [as 别名]
# 或者: from thorpy.elements.clickable.Clickable import set_style [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
示例3: _set_path_elements
# 需要导入模块: from thorpy.elements.clickable import Clickable [as 别名]
# 或者: from thorpy.elements.clickable.Clickable import set_style [as 别名]
def _set_path_elements(self, ycoord=None):
self.remove_all_elements()
i = 0
for s in self._path_list:
e = Clickable(s)
e.set_style("text")
e.normal_params.params["font_size"] = style.PATH_FONT_SIZE
e.press_params.params["font_size"] = style.PATH_FONT_SIZE
e.finish()
e.user_func = self._reaction_path
e.user_params = {"n" : i}
e.set_jailed(self.father)
## e._lock_jail = True #so that in the future jail will always stay self.father
self.add_elements([e])
i += 1
father = self
if self.father.is_finished():
father = self.father
fr = father.get_storer_rect()
wtot = h_store(fr, self._elements, gap=0, xstart="auto", ycoord=ycoord)
if wtot > fr.width:
h_store(fr, self._elements, gap=0, ycoord=ycoord,
xstart=fr.right - wtot-2)
self._n = len(self._elements)