Friday, February 24, 2012

Flex OpenCloseTabBar Component

A lot of software that uses tabs allow you to close individual tabs, and some (like browsers) allow you to open new ones. I've always thought these features should be built-in to Flex's TabBar/TabNavigator.

The following OpenCloseTabBar does just that. When clicking a tab's close button, it dispatches an event, which by default, removes the item from the dataprovider. The event is cancellable so you can call preventDefault on it and handle it however you want. When clicking the open button, it dispatches an event allowing you to push a new item into the dataprovider. There's additional API for controlling which tabs show a close button and whether or not to show the open tab button.

Either scripts and active content are not permitted to run or Adobe Flash Player version 11.1.0 or greater is not installed.

Get Adobe Flash Player


Source code located at: https://www.assembla.com/code/shinynet/subversion/nodes/

No comments:

Post a Comment