FORUMS: list search recent posts

Colorize rows in a listbox

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jacob Danell
Colorize rows in a listbox
on Apr 30, 2014 at 4:23:23 pm

Hi! I'm trying to color rows in my listbox. I have made it so far that I can color the whole listbox but not the individual rows.

This is the code I'm playing around with that color the listbox itself:

var win = new Window("palette", "New", undefined); //Creates window
var grp = win.add("group");
var listBox = grp.add("listbox", undefined, "MY Listbox", {numberOfColumns: 3, showHeaders: true, columnTitles: ["column1", "column2"]});
var myItems = listBox.add("item","Item1")
myItems.subItems[0].text = "subtest1";
myItems.subItems[1].text = "subtest2";

var winGfx = win.graphics;
var black = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1);
var blue = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [0,.75,1], 1);
var green = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [0,1,0], 1);
var red = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [1,0,0], 1);
var yellow = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [1,1,0], 1);

listBox.graphics.forgroundColor = yellow; //Set window color

win.show();

but how ever I change the code I can't make it color the individual rows. I hope someone can help me :)

Thanks!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]