Calendar

July 2006
M T W T F S S
« Jun   Aug »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Tag Cloud

Categories

Archives

Highest Rated

Most Viewed

Recent Posts

Recent Comments


« Apollo Official FAQ | Main | Custom PreLoader »

MultiRowTabs

By Rich Tretola | July 21, 2006Print This Post Print This Post
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
269 views

After strugling with an attempt to make a multirow tab navigator similar to what Darron (http://www.ifbin.com/news/2005/11/flex-15-multiline-tabnavigator-by.html) had accomplished with Flex 1.5, I was forced to take another approach since Flex 2 does not allow a TabNavigator to be in an unselected state. The new one uses multiple rows of simple buttons that have been skinned like Tabs and reposotions the rows when a selection is made of an upper row. The components must attach itself to a viewStack and also accepts arguments of tabsPerRow, rowheight, and dp. Full source code is included. Please leave comments, if you make any changes to the source code.

Right Click on application to view & download Source Code.

Run This Code

Share/Save/Bookmark

Topics: Components, Flex 2, Tutorials |

5 Responses to “MultiRowTabs”

  1. Louie Penaflor Says:
    September 7th, 2007 at 3:44 pm

    Hey Rich,
    I just posted about a component that I created awhile back that used the source from your component. Thanks for the great example.

    http://www.restlessthinker.com/blog/?p=48

  2. Erik Says:
    July 29th, 2008 at 6:37 am

    I’m having a hard time styling this using style sheets. Is there anyway of making the buttons border less at the bottom and the background white when presed? It’s so simple with the built in tabs.

  3. everythingflex Says:
    July 29th, 2008 at 2:50 pm

    Hi Eric,

    I don’t see a border on the bottom of the selected tab when I run the sample?

  4. Andrew Horvath Says:
    August 6th, 2008 at 8:23 am

    Hey Rich,
    I found your solution after some desperate hours of googling “multi line tabbar”, “multi line tabs”, etc…
    I am not sure, if this is any help for you or someone else, but I found necessery to change the code in initTabs() a little. You wrote:
    var end:Number = tabsPerRow;
    However when you have less elements than tabsPerRow, this results in a runtime error. So I used this instead:
    var end:Number = Math.min(tabsPerRow,this.dp.length);

    Ok, you might ask why would one use a multi row tabbar with only one row? In my case I use dynamic data, so I can not now how many rows the control will have.

    Anyway, thanks for this solution!
    Andrew

  5. Rich Tretola Says:
    August 6th, 2008 at 9:59 am

    Thanks for the feedback Andrew.

Comments