display data in multiple rows

hi guys

I am using <mx:HorizontalList> to display id's  from a list. this is my code


<mx:HorizontalList width="848" height="54" dataProvider="{myData.myList}"  columnWidth="150" borderStyle="none" cornerRadius="15" >
<mx:itemRenderer >					
<mx:Component>	
					 
<mx:HBox height="100%" verticalAlign="middle" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:HBox verticalAlign="middle" horizontalAlign="right" >  
<mx:LinkButton id="projectName" label="{data.id}" /> -- The problem is here when displaying the id
</mx:HBox>											
</mx:HBox>

</mx:Component>					 
</mx:itemRenderer>
</mx:HorizontalList>

Open in new window


Whenever myData.myList contains a large number of items,  <mx:LinkButton id="projectName" label="{data.id}" />  overflows and i see a horizontal scroll bar.

I do not want a scrollbar , instead i want to move over to the second row.

for example if myData.myList has 10 items, i want to show the first 6 ids in the first row and the next 4 ids in second row instead of showing all 10 ids in one row with a scrollbar.

any idea how i can acchieve this?

thanks.
royjaydAsked:
Who is Participating?
 
dgofmanConnect With a Mentor Commented:
I think you are using wrong components.
You have to use Tile and Repeater

<mx:Tile width="848" height="54" borderStyle="none" >
            <mx:Repeater id="rp" dataProvider="{myList}">
                  <mx:HBox height="100%" verticalAlign="middle" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                        <mx:HBox verticalAlign="middle" horizontalAlign="right" > 
                              <mx:LinkButton id="projectName" label="{rp.currentItem.id}" width="200"/>
                        </mx:HBox>                                                                  
                  </mx:HBox>
            </mx:Repeater>
      </mx:Tile>
0
 
royjaydAuthor Commented:
repeater puts a vertical scroll bar but i was thinking there is no way to avoid a scroll bar, it either has to be vertical or horizontal,  so dont think there is a solution to this problem.
 thanks for the answer.
can you please help with this question

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_26919455.html

thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.