Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5826] iOS: Enabled Not Working for labels in TabbedBar

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-23T23:34:32.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sn/a
ComponentsiOS
Labelstbs-1.9.0, training
Reporterrick
AssigneeEric Merriman
Created2011-10-18T15:27:43.000+0000
Updated2017-06-23T23:34:32.000+0000

Description

The enabled property of the labels for a TabbedBar do not render the tab disabled if enabled is set to false. This only happens on creation of the TabbedBar. http://developer.appcelerator.com/question/122744/tabbedbar-enable-issue
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});
 
var buttonObjects = [
    {title:'Shows', enabled:true},
    {title:'Try List', enabled:true},
    {title:'Been List', enabled:false},
];

var bb1 = Titanium.UI.createTabbedBar({
    labels:buttonObjects,
    backgroundColor:'#336699',
    top:0,
    style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
    height:50,
    width:300
});
 
bb1.addEventListener('click', function(e)
{
	buttonObjects[1].enabled = false;
    bb1.labels = buttonObjects;
});
  
win1.add(bb1);
 
//
tabGroup.addTab(tab1);  
 
// open tab group
tabGroup.open();

Comments

  1. Matthew Apperson 2011-10-20

    Thank you for raising this ticket. I am afraid we need all the information listed in the [Jira Ticket Checklist](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist) in order to accept a ticket. Once this ticket is complete, we can move it to the main project. Thank you
  2. rick 2011-10-20

    Not sure what else is missing, isn't everything from the checklist there and the problem straightforward enough?
  3. Matthew Apperson 2011-10-21

    Rick, Please review the section about the code sample. The code sample should be able to simply paste into an app.js and run without any changes. Best regards, Matt
  4. rick 2011-10-21

    Complete code sample updated.
  5. Stephen Tramer 2011-11-29

    Due to the obvious workaround, candidate for postponement
  6. Lee Morris 2017-06-23

    Closing ticket due to the time passed and lack of progress since 2011. A workaround has been provided which is the reason why this was a candidate for postponement. Please file a new ticket if you have any problems.

JSON Source