本文整理汇总了Python中lucterios.framework.xfercomponents.XferCompLabelForm.set_centered方法的典型用法代码示例。如果您正苦于以下问题:Python XferCompLabelForm.set_centered方法的具体用法?Python XferCompLabelForm.set_centered怎么用?Python XferCompLabelForm.set_centered使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lucterios.framework.xfercomponents.XferCompLabelForm
的用法示例。
在下文中一共展示了XferCompLabelForm.set_centered方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: summary_dummy
# 需要导入模块: from lucterios.framework.xfercomponents import XferCompLabelForm [as 别名]
# 或者: from lucterios.framework.xfercomponents.XferCompLabelForm import set_centered [as 别名]
def summary_dummy(xfer):
if not hasattr(xfer, 'add_component'):
return True
else:
row = xfer.get_max_row() + 1
lab = XferCompLabelForm('dummytitle')
lab.set_value_as_infocenter("Dummy")
lab.set_location(0, row, 4)
xfer.add_component(lab)
lbl = XferCompLabelForm('dummy_time')
lbl.set_color('blue')
lbl.set_location(0, row + 1, 4)
lbl.set_centered()
lbl.set_value(datetime.now().ctime())
xfer.add_component(lbl)
btn = XferCompButton('btnscheduler')
btn.set_action(xfer.request, AddSchedulerTask.get_action('Task', ''))
btn.set_location(0, row + 2, 4)
xfer.add_component(btn)
lbl = XferCompLabelForm('dummy-value')
lbl.set_location(0, row + 3, 4)
lbl.set_value(Params.getvalue('dummy-value'))
xfer.add_component(lbl)
return True
示例2: summary_dummy
# 需要导入模块: from lucterios.framework.xfercomponents import XferCompLabelForm [as 别名]
# 或者: from lucterios.framework.xfercomponents.XferCompLabelForm import set_centered [as 别名]
def summary_dummy(xfer):
row = xfer.get_max_row() + 1
lab = XferCompLabelForm('dummytitle')
lab.set_value_as_infocenter("Dummy")
lab.set_location(0, row, 4)
xfer.add_component(lab)
lbl = XferCompLabelForm('dummy_time')
lbl.set_color('blue')
lbl.set_location(0, row + 1, 4)
lbl.set_centered()
lbl.set_value(datetime.now().ctime())
xfer.add_component(lbl)
return True