如何改变应用程序的默认文本颜色? [英] How to change default text color of application?
本文介绍了如何改变应用程序的默认文本颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么能设置的所有字段的文本颜色为白色?
How can I set text color of all Fields to white?
推荐答案
据我所知,没有在BB API没有这样的选择。您只能覆盖 Field.paint(Grahpics grahpics)
,水木清华是这样的:
AFAIK, there is no such option in BB API. You can only override Field.paint(Grahpics grahpics)
, smth like this:
...
public void paint(Grahpics grahpics) {
int initialColor = grahpics.getColor(); // just in case
grahpics.setColor(Color.WHITE);
super.paint(grahpics);
grahpics.setColor(initialColor);
}
...
所以,你可以创建一组自定义白色域(WhiteLabelField,WhiteEditField等)和使用它们的原件istead。
So you could create a set of custom white-colored Fields (WhiteLabelField, WhiteEditField, etc.) and use them istead of the originals.
这篇关于如何改变应用程序的默认文本颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文