[TIMOB-5826] iOS: Enabled Not Working for labels in TabbedBar
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-23T23:34:32.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | tbs-1.9.0, training |
Reporter | rick |
Assignee | Eric Merriman |
Created | 2011-10-18T15:27:43.000+0000 |
Updated | 2017-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();
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
Not sure what else is missing, isn't everything from the checklist there and the problem straightforward enough?
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
Complete code sample updated.
Due to the obvious workaround, candidate for postponement
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.