<?xml version="1.0"?>

<!-- dpcontrols/TileListDataProvider.mxml -->

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 

initialize="initData();" >

<mx:Script>

<![CDATA[

import mx.controls.Button;

import mx.collections.*;

private var listArray:Array=[

{label: "item0", data: 0},{label: "item1", data: 1},

{label: "item2", data: 2},{label: "item3", data: 3},

{label: "item4", data: 4},{label: "item5", data: 5},

{label: "item6", data: 6},{label: "item7", data: 7},

{label: "item8", data: 8}];

[Bindable]

public var TileListdp:ArrayCollection;


private function initData():void {

TileListdp = new ArrayCollection(listArray);

}


private function forward():void {

tl.selectedIndex += 1;

}

]]>

</mx:Script>

<mx:Button label=">" click="forward()" />


<mx:HorizontalList id="tl" dataProvider="{TileListdp}" width="500"  
horizontalScrollPolicy="off"

itemRenderer="mx.controls.Button" />

</mx:Application>

  ----- Original Message ----- 
  From: Mike Pearce 
  To: [email protected] 
  Sent: Thursday, September 25, 2008 2:22 AM
  Subject: [flexcoders] Manually scroll a list component


  Hi list,

   

  Been bashing away trying to remove the scrollbar from a HorizontalList so I 
can instead use just a forward and back button.

   

  Not having a lot of luck.

   

  Has anyone done this before? 

   

  I've extended the HorizontalList class in the hope of using some of the 
protected methods like scrollHorizontally() but I seem to be wasting a lot of 
time.

   

  Any help much appreciated.

   

  Cheers,

  Mike

   
  No virus found in this incoming message.
  Checked by AVG - http://www.avg.com
  Version: 8.0.169 / Virus Database: 270.7.2/1689 - Release Date: 9/24/2008 
6:51 PM

Reply via email to