views:

7

answers:

0

I have a bunch of rows with more than one word in them, eg. "John Appleseed". I want the last word in each to be red, with the preceding words black. I know how I could rearrange the current label layout and have two with different colors, but I'm not sure that would work out.

I'd have to create a label for "John" (with the width it needs) and then a second one with "Appleseed" (with the width it needs), placed immediately after the "John" label. Even if I could get the placement correct, each cell would have to be created on demand, since none of the rows would have the same text in them (in this case.) That sounds slow.

Do I just create the labels, call size-to-fit and try and place them? I'd have to be careful not to let them truncate or reduce in size without reducing both. That sounds messy.

Is there a better way?