Might be timing. Try setting selectedIndex either before or after adding children or maybe later via callLater
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of james.tundra Sent: Wednesday, May 30, 2007 5:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] TabNavigator selectedIndex property Hey all, I've run into a problem when trying to set the selectedIndex property on a TabNavigator. The TabNavigator is set in mxml, however I am adding and removing children with AS3 at runtime depending on what node the user clicks in a Tree control (hope that makes sense). The children are doing what they are supposed to (i.e. attaching and removing, and getting initialised with whatever data I pass to them). But when the selectedIndex is, say, 3 and then the user clicks a tree node forcing the TabNavigator to remove and reload children, I am trying to reset the selectedIndex property back to 0 (to show the first tab) - this part works, that tabnavigator shows the right tab, but the tab button that appears selected is still the old property (3 in this scenario). So is this a display problem or the way that I am adding/removing children? I have tried invalidateDisplayList() and callLater, but nothing seems to help. Hope someone has some insight... Cheers.