1 Reply Latest reply on Jun 25, 2009 10:25 AM by leybniz

    Add spacer buttonBar with dataProvider viewStack

    lerooooogk Level 1

      Hi all,

       

      I want to add a spacer before the last button of a ButtonBar with a viewStack dataprovider.

       

      Is there anyway to do that?

       

      Actually I have: A  / B / C. I'd want: A / B /------------------------------/C

       

      If it's not possible, I tried to put a linkButton (to go a mxlm) on the top left but when I tried to click, a child of viewstack always appeared


         
              <!-- Barra control de la aplicación-->
             
              <mx:ApplicationControlBar id="abc" width="100%">
                  <mx:ButtonBar dataProvider="{views}"/>
                  <mx:Spacer width="100%"/>
                  <mx:LinkButton label="Actualizaciones"/>
                  <mx:Label text="Hora:"/>
                  <comp:Watch formatString="KK:NN:SS"/>
              </mx:ApplicationControlBar>
             
              <!-- Colección de contenedores hijos de la aplicación-->
             
              <mx:ViewStack id="views" width="100%" height="100%" selectedIndex="0">
                  <HomeView id="homeView" label="Inicio"/>
                  <FilterView id="filterView" label="Filtrado"/>
                  <ChartView id="chartView" label="Gráficos"/>
              </mx:ViewStack>

       

       

      Thanks in advanced,

       

      Lerogke

        • 1. Re: Add spacer buttonBar with dataProvider viewStack
          leybniz Level 4

          probably ButtonBar component it's not suitable for your intention,

          in order to mx:Spacer take any effect use distinct mx:Button instances withing mx:HBox, something like this:

           

          <mx:HBox width="100%">

               <mx:Button label="A" />

               <mx:Button label="B" />

               <mx:Spacer width="100%"/>

               <mx:Button label="C" />

          </mx:HBox>

           

          OR

           

          keep ButtonBar inplace and extract the last button as separate entity, like this:

           

          <mx:HBox width="100%">

               <mx:ButtonBar dataProvider="{buttonsAB}" />

               <mx:Spacer width="100%"/>

               <mx:Button label="C" />

          </mx:HBox>