Thanks for the feedback, guys! I implemented IDropInListItemRenderer and got ahold of listData.owner. You are right, itemRendererToIndex(...) will get you the correct index.
The trouble now is how do I bind the result of itemRendererToIndex to a label inside the itemRenderer so that it automatically updates when the dataProvider is changed? You mentioned overriding updateDisplayList(), isn't that function related more to updating the styles? Thanks again! --- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > You can implement IDropInListItemRenderer in your HBox if you want. > > > > You can also assume that "owner" is the List and call > itemRendererToIndex in an override of updateDisplayList(). > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of williamkusumo > Sent: Wednesday, June 13, 2007 5:53 PM > To: [email protected] > Subject: [flexcoders] Re: Show incremental numeric index in a List > > > > A quick note: The itemRenderer is based on HBox. So it does not > implement IDropInListItemRenderer, thus I don't have reference to > listData. > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > , "williamkusumo" <williamkusumo@> > wrote: > > > > Hi! > > > > I have a List bounded to a dataProvider and an itemRenderer. Could > > anyone advice me on how I can insert an incremental numeric index in > > each list item (1, 2, 3, and so on)? This list can be re-arranged via > > drag-n-drop, so I can't put the index as part of the data. > > > > Any help will be greatly appreciated. > > > > Thanks! > > >

