单据中修改控件样式原创
3人赞赏了该文章
698次浏览
编辑于2023年06月08日 16:34:32
// 设置标题方向 Map<String, Object> fieldMap = new HashMap<>(); fieldMap.put(ClientProperties.TextAlign, "right"); // 右对齐 this.getView().updateControlMetadata("fieldname", fieldMap);
// 设置字体大小 Map<String, Object> fieldMap = new HashMap<>(); fieldMap.put(ClientProperties.FontSize, 20); this.getView().updateControlMetadata("fieldname", fieldMap);
// 设置前景色 Map<String, Object> fieldMap = new HashMap<>(); fieldMap.put(ClientProperties.ForeColor, "#FFCC00"); // 橙色 this.getView().updateControlMetadata("fieldname", fieldMap);
// 设置可见性 Map<String, Object> fieldMap= new HashMap<>(); fieldMap.put(ClientProperties.Visble, true); this.getView().updateControlMetadata("fieldname", fieldMap);
// 设置标题内容 Map<String, Object> fieldMap = new HashMap<>(); fieldMap.put(ClientProperties.Caption, new LocaleString("Caption")); this.getView().updateControlMetadata("fieldname", fieldMap);
// 设置文本(例如给超链接设置文本) Map<String, Object> fieldMap = new HashMap<>(); fieldMap.put(ClientProperties.Text, new LocaleString("这是一个超链接")); this.getView().updateControlMetadata("fieldname", fieldMap);
推荐阅读