{ "id": "63129", "key": "TIMOB-2497", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-04-15T03:21:21.000+0000", "created": "2011-04-15T03:21:20.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "button", "ios", "ipad", "labels" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T21:32:12.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
I am trying to use the nightly build version 1.5 (b7b9e785),\nbecause I need to i18n features, but there are several strange\nbehaviors that didn't happen before on 1.4 and older versions of\n1.5. Most of the bugs I found are related to opacity and\nzIndex.
\nProblem: Adding a Label in a Button, the Label\ndoes not appear in the screen, even when setting high zIndex\nvalues. here is the piece of code with problem.
\nCode:
\n\nvar btn_Username = Ti.UI.createButton({\n backgroundImage: 'images/btn_username.png',\n backgroundSelectedImage: 'images/btn_username_selected.png',\n height: 49,\n width: 243,\n left: 207,\n top: 0,\n opacity: 1,\n zIndex: 1,\n style: Titanium.UI.iPhone.SystemButtonStyle.PLAIN\n});\nview.add(btn_Username);\n\nvar titleLabel = Ti.UI.createLabel({\n color: '#ffffff',\n text: Ti.App.myMemeInfo.title,\n font: {fontSize:14, fontFamily:'Helvetica Neue', fontWeight:'bold'},\n textAlign: 'left', \n top: 14,\n left: 12,\n height: 20,\n width: 200,\n opacity: 1,\n zIndex: 99 \n});\nbtn_Username.add(titleLabel);
\n
\nWhen I add the \"title\" attribute in the Button it works, but I\ncan't control the width of this text separately from the width of\nthe Button, so this attribute does not work for me.
\nPlatform versions: iOS SDK Version: 4.2
\nTitanium Developer: 1.2.1
The source code of my App is available on GihHub:
\nhttp://github.com/acarlos1000/MemeiPad/
Antonio
\nA control, such as a button, cannot have children. Instead, add\nboth to a view, and position the label so that it appears over the\nbutton, or simply use the button's title property.
\nMy preference would be to use the button's title.
\nIf there are issues with the button title and i18n in 1.5, then\nI'd recommend that you raise them in the Q&A, to confer with\nthe community and confirm that it really is a bug.
Blain, I propose this ticket be marked invalid.
OK, I will change my code and use Views instead of Buttons
Duplicate was #2517