About Store Forum Documentation Contact
Donations:
158$/mo



Post Reply 
List Elements Background Color
Author Message
fatcoder Offline
Member

Post: #1
List Elements Background Color
It doesn't appear to be possible to set the background color of elements in a list. I would like to be able to use alternating background colors for odd/even elements (rows). For example, the odd rows have a white background color and the even rows have a light grey background color.

I find that lists with a lot in them become very hard to distinguish one line from the next. Just turns into a wall of text.

I'd be happy to override List and do some custom drawing to draw a colored rect behind each row, but I don't think List exposes enough to be able to work out where to draw for each row.
(This post was last modified: 03-06-2013 03:28 PM by fatcoder.)
03-06-2013 03:05 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: List Elements Background Color
you can do this with, pseudo code:
Code:
virtual draw
{
   use list.elmHeight().
   use parent region slidebar [1].offset or probably gpc.offset would be enough
   use columnsVisible(), columnsHeight()

   super.draw();
}

if you still won't be able to make it work, let me know and I'll add this to the roadmap
03-09-2013 12:41 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #3
RE: List Elements Background Color
Great, thanks for that. Just tried it out and it works well.
03-13-2013 04:51 PM
Find all posts by this user Quote this message in a reply
Post Reply