Hi,

Good timing as I think I'm trying to do a similar thing:
highlighting rows in a List via an item renderer and "highlighted"
property on the data model.  After updating the data model, I
plan to call refresh() and expect it will automatically fire the
item renderer for each visible row; the renderer will detect highlighted
rows via the data property and apply an appropriate style.  Will my
approach work or are you saying I'll need to explicitly dispatch
events?

I'm not using a custom gradient and so am not too concerned about the
bugginess you report but would love to see your general approach.
Care to share some code?  We can do it offline, if you wish:
[email protected].

Finally, I don't get the part about indexToItemRenderer.  Can't you do
everything through the data model and data binding (using refresh) without
iterating over the List itself?

Thanks, Garry


--- In [email protected], "djhatrick" <djhatr...@...> wrote:
>
> OK, we've all done it, made custom gradients for highlight fills in
> list itemRenderers, the way I do it is to use properties in my
> valueObjects.  So, I set a property called highlighted or selected on
> my value object when one item is highlighted or selected I loop over
> the rest of my objects in the collection and set their highlight or
> selected value to false, in  turn, which dispatches an event to remove
> my custom gradient.  I follow the same the way List component does to
> get the indexToItemRenderer formula.  While this works perfectly for
> selected items, I do notice a little edge case buggyness on highlight
> fills... Sometimes, my mouseOvers don't seem make my other
> itemRenderers show their highlighted fill color...
> Usually when I rollout of my list and roll back in real quick.
> 
> Any suggestions on this, I obsess and keep going through the logic and
> keep trying a slightly different approach. 
> 
> First, is there a better way to draw a greadient into an itemRenderer
> that I don't know about, by like drawing in the sprite or something...
> 
> Second, if there isn't has anybody got this to work aboslutely
> perfectly.   I'd love to hear from you and I'd be happy to show you
> what I've done...
>


Reply via email to