我无法更改 GXT 文本区域的默认字体系列。我尝试过使用 StyleInjector 和 CSS。但它没有得到更新。你能帮我吗?
TextArea textArea = new TextArea();
textArea.setStyleName("gxtTextArea");
在 CSS 文件中,我给出了,
.gxtTextArea {
font-family: Arial !important;
/* color: red !important;
font-size: 24px !important;
font-style: bold !important;
font-weight: bold !important; */
}
最佳答案
您还可以使用 addStyleName 代替 setStyleName。
TextArea textArea = new TextArea();
textArea.addStyleName("gxtTextArea");
在 CSS 方面,将其更改如下。
.gxtTextArea * {
font-family: Arial !important;
/* color: red !important;
font-size: 24px !important;
font-style: bold !important;
font-weight: bold !important; */
}
关于java - 无法更改 GXT 文本区域中的字体系列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44433705/