views:

842

answers:

1

Hi, I have a TabBar Control with 3 tab, i need to add controls(Button,Label) dynamically in to each tab, I can add the controls to the initial selected tab but when i add to next tab , i am getting Null exception error.. That is when TabBar property selectedIndex="0" means i can add to 1st tab.but not in 2 and 3rd. when Tabbar property selectedIndex="1" means i can add to 2nd tab.but not in 1 and 3rd.

If u have any sample or link for dynamic adding controls to TabBAr control Pls reply me.

Thank in Advance.

+1  A: 

Try setting the creationPolicy="all".

For more info: http://livedocs.adobe.com/flex/3/langref/mx/core/Container.html#creationPolicy

maclema
Thanks a lot maclema ... its working very nice
vineth
If that is the answer please click the check mark on the left, that way others can see that the question has been answered.
maclema
Done................. maclema
vineth