[英]How to change font size in GXT Label
With GXT 3.0, I failed to change the font size of a simple label: 使用GXT 3.0,我无法更改简单标签的字体大小:
Label title = new Label("Hello world");
title.getElement().setAttribute("font-size", "50px");
RootPanel.get().add(title);
Don't find anything in the doc! 在文档中找不到任何内容!
I know this answer is really late but there is a chance that someone else will have similar problem. 我知道这个答案真的很晚,但是有可能其他人也会遇到类似的问题。 So I found a solution like this:
所以我找到了这样的解决方案:
title.setStyleAttribute("font-size", "30px");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.