Set focus to control in panel inside accordion

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Set focus to control in panel inside accordion

    I have an accordion control that has forms as children for the different views.
    At the bottom of each view (except the last), I have a continue button that
    advances the user to the next panel in the accordion. The focus, however stays
    on the accordion control and tabs through the rest of the interface before it
    gets back to the new view. How do I set the focus on a specific control inside
    the form when a panel becomes active? I'm sure it's something really simple, I
    just haven't been able to get it to work.

    AnoPres Guest

  2. Similar Questions and Discussions

    1. Focus, Browsers & Spry Accordion
      I'm using the Spry Accordion (and like it a lot), but I've observed a minor unwanted effect: In some browsers (FF and Chrome) there is a frame...
    2. Accordion Content Panel
      Is there a way to get text to wrap around an image in the content panel. I have inserted an image and when I go to type text it does not wrap around...
    3. Skinning Panel & TitleWindow & Accordion
      I want to create custom components based on Panel, TitleWindow and Accordion. I know how to create custom components, the basics only, but I want to...
    4. Radio buttons inside Accordion tab?
      So I upgraded to 1.6.1 and fixed my IE issues, but it broke my radio buttons. On my page (http://www.riverviewbiblecamp.com/menu.php) I've got radio...
    5. Access inside the windows of an accordion
      Another question about my menu: this menu is on the left side of the screen. on the right side, i have an accordion, which is inside a component :...
  3. #2

    Default Re: Set focus to control in panel inside accordion

    have you tried using tabIndex? I believe you will need to give the accordion a
    tabIndex as well so that since you selected it, it has focus.

    <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" >
    <mx:TextInput tabIndex="1"/>
    <mx:Accordion height="250" width="100%"
    change="event.target.selectedItem.setFocus();" tabIndex="2">
    <mx:Form defaultButton="btn1" width="100%" tabIndex="3">
    <mx:FormItem label="Name">
    <mx:TextInput tabIndex="4"/>
    </mx:FormItem>
    <mx:FormItem>
    <mx:Button label="button" id="btn1" tabIndex="5"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Form defaultButton="btn2" width="100%" tabIndex="6">
    <mx:FormItem label="Name">
    <mx:TextInput tabIndex="7"/>
    </mx:FormItem>
    <mx:FormItem>
    <mx:Button label="button" id="btn2" tabIndex="8"/>
    </mx:FormItem>
    </mx:Form>
    </mx:Accordion>
    <mx:Button label="last" tabIndex="9"/>
    </mx:Application>

    bdeen Guest

  4. #3

    Default Re: Set focus to control in panel inside accordion

    Thanks. Not exactly what I was looking to do, but it should work just fine.
    AnoPres Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139