1 Reply Latest reply on Apr 10, 2008 5:40 PM by slaingod

    <mx:List> Dynamic Height

    XXIlladelphia
      Ok, I have a list.

      The list uses an itemRenderer that has dynamic content.

      The itemRenderers can be different heights from any range, and variableRowHeight is true.

      I need the list to show all of the items at once, thus increasing or decreasing the height of the list depending on what has been dragged into, loaded into, data change, etc.

      list.measureHeightOfItems() does not work properly, or I am not sure ( a thorough explanation might be helpful ).

      Please, somebody have an idea!
        • 1. Re: <mx:List> Dynamic Height
          slaingod Level 1
          You could/should probably handle this manually, and just increase the list size when you get the drop event or change event on the list control, so the list doesn't grow forever. You could put the list control inside a canvas potentially, so that once the list reached a certain size, the canvas would add scroll bars, or you could do this manually as well with the change or resize events, by doing a conditional to set the max size of the code (though it is more 'hardcoded' that way).