Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Set text color in tableView

I have a dead simple tableView that is set to a transparent background that shows a (mostly) black background beneath.

I want to set the text for the table rows to white, but I can't figure it out for the life of me. I have checked the docs expecting to be able to pass color to the tableView constructor, or add it as an element of the data array. I am trying to avoid the extra code of creating tableViewRows and setting the color of a label. Is that the only way?

— asked March 13th 2010 by Jackson Miller
  • color
  • tableview
  • tableviewrow

2 Answers

  • Accepted Answer

    Currently, you would have to have a label object within your row then you can set the color property on the Label. I will create a ticket around being able to set the color and selectedColor of the title attribute for the simple cases.

    — answered March 13th 2010 by Nolan Wright
  • So. Did anything happen with this in the last 2 years? Would be a nice feature if we could simply set font colours instead of having to add labels and complicating the whole matter….

    — answered September 23rd 2011 by Robert Turrall
    1 Comment
    • found. scrub that.

      — commented September 23rd 2011 by Robert Turrall
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.