简体   繁体   English

如何在GXT3网格中更改字体

[英]How to change the font in the grid GXT3

对不起这个简单的问题,如何更改网格中的字体?

If you are talking about the text which might be displayed in one of your columns, you can do this easily with cells. 如果您要讨论的是可能显示在您的一列中的文本,则可以使用单元格轻松地做到这一点。 When you set up your ColumnModel class, you can pass a custom cell to one of the columns. 设置ColumnModel类时,可以将自定义单元格传递到其中一列。 Then, with html and css, you can style up the column per your needs. 然后,使用html和css,您可以根据需要对列进行样式设置。

If you want to change the column headers, then you can simply pass some SafeHtml to that column's ColumnConfig.setHeader(SafeHtml) method. 如果要更改列标题,则只需将一些SafeHtml传递到该列的ColumnConfig.setHeader(SafeHtml)方法。 Again, this would be done when you set up your ColumnModel . 同样,这将在您设置ColumnModel This let's you style up the header however you wish. 这使您可以随意设置标题的样式。

If you do use images or css, I highly suggest using the ClientBundle and CSSResource classes. 如果确实使用图像或CSS,我强烈建议您使用ClientBundleCSSResource类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM