CodenameOne-更改主题中复选框的颜色 [英] CodenameOne - change color of checkbox in theme

查看:46
本文介绍了CodenameOne-更改主题中复选框的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在cn1项目中使用了'Blue Flat'主题,并且 MultiButton 组件中的复选框(我假设遵循Button文本颜色)是完全白色的,使它们在白色背景上不可见。我尝试过更改主题的前景色(在GUI Builder主题选项卡中),我尝试用较深阴影的复选框替换主题文件,但似乎没有影响。

I'm using the 'Blue Flat' theme in a cn1 project, and the checkboxes in a MultiButton component (I suppose following the Button text color) are completely white, making them invisible on a white background. I've tried changing their foreground color in the theme (in the GUI Builder theme tab), I tried replacing the theme files with checkboxes of a darker shade, but nothing seems to affect it.

如何使 MultiButton 复选框具有不同的颜色?

How can I make the MultiButton checkbox a different color?

推荐答案

蓝色主题自定义复选框图像主题常量,在这种情况下,您可以删除该常量以派生主题颜色:

The blue theme customizes the checkbox image theme constant which you can remove at which case it should derive theme colors:

https://www.codenameone.com/manual/advanced-theming.html#_theme_constants

只需在主题中选择常量选项卡,然后删除与复选框相关的内容即可。

Just select the constants tab in the theme and remove the ones relevant to the checkbox.

这篇关于CodenameOne-更改主题中复选框的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆