Change highlighted button in tabbar via code ?

I have a tabbar on my app and all works fine but sometimes in code I need to switch to another scene, which is fine except the tabbar doesn’t change accordingly.

Is there a way of telling the tabbar to switch tabs or just changing the button to selected is fine ?

Dave

There is a function, tabBar:setSelected( tab ) iirc. Check out the tab bar docs for more info :slight_smile:

Hope this helps

Cheers, thats sorted it.

Trouble with looking at the Docs, I was looking here - http://docs.coronalabs.com/api/library/widget/newTabBar.html but saw no mention of it.

Now I know the name of the function, it’s easy to find but there lies the problem.

Dave

Np.

Yeah, you can find these things listed under the ‘return value’ link on the respective doc page.

Granted, it’s not obvious at all.

Cheers

There is a function, tabBar:setSelected( tab ) iirc. Check out the tab bar docs for more info :slight_smile:

Hope this helps

Cheers, thats sorted it.

Trouble with looking at the Docs, I was looking here - http://docs.coronalabs.com/api/library/widget/newTabBar.html but saw no mention of it.

Now I know the name of the function, it’s easy to find but there lies the problem.

Dave

Np.

Yeah, you can find these things listed under the ‘return value’ link on the respective doc page.

Granted, it’s not obvious at all.

Cheers