【分享】移动BOS开发 -- 控件属性设置代码示例
金蝶云社区-emily
emily
5人赞赏了该文章 2091次浏览 未经作者许可,禁止转载编辑于2018年08月29日 19:49:36

1、可见性设置
    this.View.GetControl("FButton").SetCustomPropertyValue("visible", true);
2、锁定性设置
    this.View.GetControl("FDate").SetCustomPropertyValue("disabled", true);
3、按钮、标签背景色设置
    this.View.GetControl("FButton").SetCustomPropertyValue("backcolor", "115,208,241");
4、按钮、标签字体颜色设置
    this.View.GetControl("FButton").SetCustomPropertyValue("forecolor", "255,255,255");
5、按钮、标签文本值设置
    this.View.GetControl("FLable").SetCustomPropertyValue("value", "我是标签");
6、高度、宽度设置
    this.View.GetControl("FDocEntity").SetCustomPropertyValue("height", 100);
    this.View.GetControl("FDocEntity").SetCustomPropertyValue("width", 320); 
7、设置页签控件的当前选中页签
    this.View.GetControl<TabControl>("FTab").SetCustomPropertyValue("selectedIndex", 2);
8、设置控件背景图片
    this.View.GetControl("FButton").SetCustomPropertyValue("backgroundurl", "img.png");

赞 5