本文整理汇总了Python中Components.Label.Label.text方法的典型用法代码示例。如果您正苦于以下问题:Python Label.text方法的具体用法?Python Label.text怎么用?Python Label.text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Components.Label.Label
的用法示例。
在下文中一共展示了Label.text方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Components.Label import Label [as 别名]
# 或者: from Components.Label.Label import text [as 别名]
def __init__(self, session, args = 0):
self.session = session
Screen.__init__(self, session)
self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
{
"cancel": self.cancel,
"ok": self.keyOk,
}, -2)
self.setTitle(_("UserSkin %s") % UserSkinInfo)
self['skininfo'] = Label("")
if path.exists(SkinPath + 'skin.config'):
with open(SkinPath + 'skin.config', "r") as f:
for line in f:
if line.startswith('description='):
self['skininfo'].text = line.split('=')[1].replace('"','').replace("'","").strip()
break
f.close()
示例2: __init__
# 需要导入模块: from Components.Label import Label [as 别名]
# 或者: from Components.Label.Label import text [as 别名]
def __init__(self, session, picPath = None):
Screen.__init__(self, session)
print '[sfteambckScreen] __init__\n'
self.picPath = picPath
self.Scale = AVSwitch().getFramebufferScale()
self.PicLoad = ePicLoad()
self['sftPic'] = Pixmap()
self['information'] = Label('')
self['information'].text = _('\n\n\n\nInstructions\n------------------------------\n\n1) Mount HDD in your receiver\n2) En caso necesario monte como HDD pulsando boton azul\n3) Click OK to start the process')
self['actions'] = ActionMap(['OkCancelActions', 'ColorActions'], {'cancel': self.cancel,
'blue': self.mount,
'green': self.preHaceBackup,
'red': self.cancel}, -1)
self['key_red'] = Label(_('Cancel'))
self['key_green'] = Label(_('OK'))
self['key_blue'] = Label(_('Mount'))
self.PicLoad.PictureData.get().append(self.DecodePicture)
self.onLayoutFinish.append(self.ShowPicture)
示例3: SetMessage
# 需要导入模块: from Components.Label import Label [as 别名]
# 或者: from Components.Label.Label import text [as 别名]
def SetMessage(self, msg):
if not self.has_key("Statusbar"):
self["Statusbar"] = Label("")
self["Statusbar"].text = str(msg)