« Apollo Official FAQ | Main | Custom PreLoader »
MultiRowTabs
| By Rich Tretola | July 21, 2006 | Print This Post
|
| 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.
Topics: Components, Flex 2, Tutorials |








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
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.
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?
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
August 6th, 2008 at 9:59 am
Thanks for the feedback Andrew.