2 Replies Latest reply on Oct 19, 2006 2:43 PM by ntsiii

    Select and DeSelect All buttons to a list box control with checkboxes

      I am trying to use two buttons on labeled Select All the other DeSelect All. These two buttons will either check or unckeck the check boxes in a listbox control. I have included the code for the regions listbox below. The two buttons are on a seperate mxml file. They are labeled by id functions as "selectall" and "deselectall". I think I need to bind the buttons to an arrary that will either select or deselect each checkbox in the list control. Any help you can give me would be great.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas width="166" xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*">
      <mx:List width="166" dataProvider="{regions}">
      <mx:CheckBox id="complete" selected="{data.selected}" click="data.selected=complete.selected"/>
      <mx:Text id="taskname" x="23" text="{data.label}" selectable="false"/>

      // Test Data for abc utility.
      public var regions:Array = [
      {completed:false, label:'Carolina/Tennessee'},
      {completed:false, label:'Central Texas'},
      {completed:false, label:'Florida'},
      {completed:false, label:'Georgia/Alabama'},
      {completed:false, label:'Great Plains'},
      {completed:false, label:'Houston/Gulf Coast'},
      {completed:false, label:'Illinois/Wisconsin'},
      {completed:false, label:'Kansas/Missouri'},
      {completed:false, label:'Los Angeles'},
      {completed:false, label:'Moutain'},
      {completed:false, label:'New England'},
      {completed:false, label:'New York Metro'},
      {completed:false, label:'Northern CA/Nevada'},
      {completed:false, label:'Ohio'},
      {completed:false, label:'Pacific Northwest'},
      {completed:false, label:'Pennsylvania'},
      {completed:false, label:'Philadelphia Tri-St'},
      {completed:false, label:'San Diego'},
      {completed:false, label:'Southwest'},
      {completed:false, label:'Upstate New York'},
      {completed:false, label:'Washington/Balt/Virg'}