File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes How to conditionally change text color? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How to conditionally change text color?" Watch "How to conditionally change text color?" New topic
Author

How to conditionally change text color?

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329

Would any of you guys happen to know how I can conditionally change the color of text that's within a ListView?
Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
Actually. I forgot to mention that it is a wicket org.apache.wicket.markup.html.list.ListView.
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

You can add a SimpleAttributeModifier. For an example how to use alternating color in a list have a look at http://apache-wicket.1842946.n4.nabble.com/change-tr-background-color-when-ListView-iterate-td1894024.html
rajeev yadav
Greenhorn

Joined: Mar 28, 2011
Posts: 26
Use SimpleAttributeModifier to change the text color.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to conditionally change text color?