This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
jQuery in Action, 2nd edition
 
subject: How to conditionally change text color?
 
Similar Threads
Changing Color of a selectedtext in TextArea
Change Text area's Limited Text Color
Change color of a LookAndFeel
HTML text Color Changer
How to make JComboBox flash (red color)?