Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Disabled TabbedBar button wont stay disabled on iPhone


Ive run into a strange issue with the TabbedBar on the iPhone (I havent tested on anything else yet) which maybe a bug, but I hope its just me being daft! It seems you can only set a tab button to be disabled as long as you do not set any of the other tab buttons to be selected 'in code'. As an example, consider the following:

var tabs = [{title: 'Tab 1', enabled: true }, 
            {title: 'Tab 2', enabled: false }];

var myTabbedBar = Ti.UI.createTabbedBar({
   labels: tabs,

Works as expected. Both tab buttons are created, the first tab button is enabled and the second tab button is disabled (note: neither tab button is selected!). However, by selecting a default tab button using:

var myTabbedBar = Ti.UI.createTabbedBar({
   labels: tabs,
   index: 0,

Or by setting the selected index:

myTabbedBar.index = 0;

Results in all tab buttons becoming enabled.

Has anyone else seen this? - As yet, I haven't found a solution.


— asked August 31st 2010 by Robert Watson
  • disabled
  • enabled
  • index
  • iphone
  • iphone mobile
  • mobile
  • tabbedbar

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.