If you know the borders, paddings and positioning of the datagroup, can’t you 
then calculate the width?  Maybe compare the DataGroup’s x,y,w,h.


On 8/17/10 7:35 PM, "[email protected]" 
<[email protected]> wrote:






Spark. If the item renderer item is outside of the Lists visible area then it 
returns width or height 0 or sometimes index out of bounds errors. It seems 
items aren't created if they haven't been scrolled into view yet and if they 
have but they aren't in view currently then I think it's returning width and 
height as 0. I've made sure to set useVirtualLayout false.

<s:HorizontalLayout useVirtualLayout="false"/>

I don't have the columnWidth or list height set but I have the ItemRenderer 
width and height set to 32.

On Tue, Aug 17, 2010 at 8:05 PM, Alex Harui <[email protected]> wrote:





Spark or MX List.  Did you confuse width for height?




On 8/17/10 2:30 PM, "[email protected] 
<http://[email protected]> " <[email protected] 
<http://[email protected]> > wrote:






How would I get the width of an item renderer in a list?

I'm trying to fit the width of a list so that it doesn't clip an item renderer 
half way thru if there's not enough space. So if the List is 105 px wide and an 
single itemrenderer is 10 pixels wide then I want to resize the list to 100 
pixels so item 11 doesn't show.





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to