设置单据体只读单元格的显示隐藏,掩码,Tooltips与指定Tool tips内容

本篇基础:BOS平台的二开编程(论坛),C#编程(ms),python语法,json语法
1、如果是列表需要Tooltip仅是显示字段内容,没有额外需求,可以通过BOSIDE进行设置即可,如下图;


2、如果Tooltip需要额外的显示不同于字段的文本内容,或显示隐藏、掩码等,就需要编程实现;
2.1、设置单据体只读单元格的显示隐藏,掩码,Tooltip与指定Tooltip内容:(隐藏是制造的,Tooltip是多语言的原始需求。)
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *
def AfterBindData(e):
#this.View.ShowMessage("OK")
ekey = "FEntity"
this.View.StyleManager.SetEnabled(ekey, "FText", False)
this.View.StyleManager.SetEnabled(ekey, "FText1", False)
this.View.StyleManager.SetEnabled(ekey, "FText2", False)
grd = this.View.GetControl(ekey)
grd.SetCustomPropertyValue("DefaultDisabeCellBackground","Transparent")
grd.SetCustomPropertyValue("DefaultDisabeCellForeground","Green")
he = HiddenEntity()
he.H = True
he.M = "*****"
grd.SetCellHidden("FText1", he, 3)
he = HiddenEntity()
he.H = True
he.M = ""
设置单据体只读单元格的显示隐藏,掩码,Tooltips与指定Tool tips内容
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。



