Python表单插件给标签控件赋值原创
金蝶云社区-碎银几两
碎银几两
2人赞赏了该文章 70次浏览 未经作者许可,禁止转载编辑于2023年11月01日 11:20:49

想实现文本字体变大和背景色,文本颜色;效果图如下:

image.png

这是两个分组标题和两个标签控件实现的,先在BOS里面增加两个标签控件,因为显示数据是数字型的,所以默认为0.00;然后加了两个分组标题放在上面;插件代码如下:


def AfterBindData(e):
    this.View.GetControl("F_ora_Lable").SetCustomPropertyValue("BackColor""#000000");
    this.View.GetControl("F_ora_Lable1").SetCustomPropertyValue("BackColor""#000000");
def DataChanged(e):
    fldKey=e.Field.Key.ToUpperInvariant();#字段标识大写
    if(fldKey=="F_ora_Combo".ToUpperInvariant()):
        newValue1=this.View.Model.GetValue("F_ora_Decimal6");
        newValue2=this.View.Model.GetValue("F_ora_Decimal7");
        #newValue1=e.F_ora_Decimal6;
        #newValue2=e.F_ora_Decimal7;
        this.View.GetControl("F_ora_Lable").SetValue(newValue1);
        this.View.GetControl("F_ora_Lable1").SetValue(newValue2);


作者:爱孤独又爱你

来源:金蝶云社区

原文链接:https://vip.kingdee.com/article/506797680144698368?productLineId=1

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


赞 2