Vaadin 是否可以为 ComboBox 中的文本项设置不同颜色 [英] Vaadin is it possible to have different colors for text items in ComboBox
本文介绍了Vaadin 是否可以为 ComboBox 中的文本项设置不同颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,在我的 ComboBox 中,我希望费用项目用红色文本着色,收入项目用绿色文本着色.假设我正在使用 BeanItemContainer
工作,我如何在 Vaadin 的 ComboBox 组件中执行此操作?
For example in my ComboBox I want the expense items to be colored in red text and the revenue items to be colored in green text. How can I do this in Vaadin's ComboBox component, assuming I'm working from a BeanItemContainer
?
推荐答案
如果没有任何客户端修改,ComboBox 是不可能的.或许可以开发您自己的 Extension,这样就可以了.
It's not possible with the ComboBox without any client-side modifications. It might be possible to develop your own Extension, that would do that.
这篇关于Vaadin 是否可以为 ComboBox 中的文本项设置不同颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文