5 Replies Latest reply: Feb 19, 2013 12:25 PM by fsoender RSS

    Spinner list to pop up with a button click

    fsoender

      I want a spinner list to pop up when a button is clicked,

      do any one have a example code for this?

        • 1. Re: Spinner list to pop up with a button click
          DeanLoganBH Community Member

          Do you mean something like

           

          <s:Spinner id="mySpinner" visible="false" minimum="2"  maximum="20" />

          <s:Button id="myButton" label="Open Spinner" click="{mySpinner.visible = true}" />

           

          • 2. Re: Spinner list to pop up with a button click
            fsoender Community Member

            Thanks, will try this out

            • 3. Re: Spinner list to pop up with a button click
              fsoender Community Member

              I cant get it to work it with this code:

               

              How do I implement the code to my code so I can use the button to open spinner?

               

               

               

               

              <?xml version="1.0" encoding="utf-8"?>

              <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                            xmlns:s="library://ns.adobe.com/flex/spark" title="Sample SpinnerList" xmlns:r="renderers.*">

                     <s:layout>

                            <s:VerticalLayout paddingTop="40" paddingBottom="5" paddingLeft="5" paddingRight="5" gap="10"

                                                         horizontalAlign="center" verticalAlign="top"/>

                                        

                     </s:layout>  

                     <s:SpinnerListContainer width="200">

                            <s:SpinnerList width="100%">

                                   <s:dataProvider>

                                         <s:ArrayCollection>

                                                <fx:String>Test1</fx:String>     

                                                <fx:String>Test2</fx:String>     

                                                <fx:String>Test3</fx:String>     

                                                <fx:String>Test4</fx:String>

                                                <fx:String>Test5</fx:String>

                                         </s:ArrayCollection>

                                   </s:dataProvider>

                            </s:SpinnerList>

                     </s:SpinnerListContainer>

              </s:View>

              • 4. Re: Spinner list to pop up with a button click
                DeanLoganBH Community Member

                Based on what you posted, you need to look at this link : 

                Understanding Flex Mobile View and ViewNavigator

                 

                Because it looks like you put everything in a View.  So, what you need to do is on the Main make the View visible when the button is clicked.

                 

                My example was to just make the spinner visible when the button was clicked.