{ "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.

\n

Problem: 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.

\n

Code:

\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
\n

When 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.

\n

Platform versions: iOS SDK Version: 4.2
\nTitanium Developer: 1.2.1

\n

The source code of my App is available on GihHub:
\nhttp://github.com/acarlos1000/MemeiPad/

{html}", "attachment": [], "flagged": false, "summary": "Adding Label on Button, Label is not displayed ( v1.5.0 githash: b7b9e785)", "creator": { "name": "antoniocarlossilveira", "key": "antoniocarlossilveira", "displayName": "Antonio Carlos Silveira", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "antoniocarlossilveira", "key": "antoniocarlossilveira", "displayName": "Antonio Carlos Silveira", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128643", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Antonio

\n

A 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.

\n

My preference would be to use the button's title.

\n

If 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.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:21:21.000+0000", "updated": "2011-04-15T03:21:21.000+0000" }, { "id": "128644", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Blain, I propose this ticket be marked invalid.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:21:21.000+0000", "updated": "2011-04-15T03:21:21.000+0000" }, { "id": "128645", "author": { "name": "antoniocarlossilveira", "key": "antoniocarlossilveira", "displayName": "Antonio Carlos Silveira", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

OK, I will change my code and use Views instead of Buttons

{html}", "updateAuthor": { "name": "antoniocarlossilveira", "key": "antoniocarlossilveira", "displayName": "Antonio Carlos Silveira", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:21:21.000+0000", "updated": "2011-04-15T03:21:21.000+0000" }, { "id": "128646", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Duplicate was #2517

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:21:21.000+0000", "updated": "2011-04-15T03:21:21.000+0000" }, { "id": "410603", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T21:32:12.000+0000", "updated": "2017-03-09T21:32:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }