2 Replies Latest reply on Apr 3, 2010 11:17 AM by samiujan

    Flex4: Different lengths of tabbar button text slows loading time

    samiujan

      This is possibly a bug

       

      if the size of text in tabbar buttons in a <s:Tabbar> component are of different sizes, it slows down application completion time - please see following code - if the length of the text is same (I did that by appending spaces to the label values, the application renders immediately - otherwise the "loading" progressBar goes till the end, then stays there for about 5 seconds before rendering - the length of the tabs is also messed up


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:s="library://ns.adobe.com/flex/spark"
                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" >
         
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <s:TabBar x="11" y="66" width="80%" height="25" dataProvider="{updatesViewStack}"
                    fontFamily="Verdana" fontSize="17" fontWeight="bold" textAlign="center"/>
          <mx:ViewStack x="12" y="109" id="updatesViewStack" width="800" height="800">
              <s:NavigatorContent label="Tab1" width="100%" height="100%">
              </s:NavigatorContent>
              <s:NavigatorContent label="Mytab 22" width="100%" height="100%">
              </s:NavigatorContent>
              <s:NavigatorContent label="Another tab here" width="100%" height="100%">
              </s:NavigatorContent>
              <s:NavigatorContent label="And more " width="100%" height="100%">
              </s:NavigatorContent>
              <s:NavigatorContent label="And a last one" width="100%" height="100%">
              </s:NavigatorContent>
          </mx:ViewStack>
      </s:Application>