Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2457] Error in Label on Button on 1.5.0 (11/29/2010)

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T03:20:17.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsbutton, ios, label
ReporterAdriano Paladini
AssigneeStephen Tramer
Created2011-04-15T03:20:16.000+0000
Updated2017-03-23T21:37:08.000+0000

Description

Hi,
I'm creating an app for iPad, tested in 3.2.2 and 4.2.1
I use a custom button to create an iPhone style button.

var btn = Ti.UI.createButton({
        backgroundImage:'img/btn.png',
        backgroundSelectedImage:'img/btn_o.png',
        height:57,
        width:200
    });
var lblBtn = Ti.UI.createLabel({
        color:'#fff',
        font:{fontSize:12,fontWeight:'bold'},
        shadowColor:'#000',
        shadowOffset:{x:1,y:1},
        right:0,
        left:0,
        height:'auto',
        text:'My button',
        textAlign:'center'
    })
btn.add(lblBtn);

This code reproduce a button with a title with shaddow. This work perfectly in 1.4.3, but NOT in 1.5.0.
If my image is opaque i don't see this label, but if has an opacity, i see the label below the backgroundImage.

Comments

  1. Adriano Paladini 2011-04-15

    Hi, i teste the final version of 1.5.0 and now this was corrected.

  2. hal 2011-04-15

    Adriano

    You should not add a label to a button. Create a view and add both the button and label to it.

    Stephen - for the above reasons, can this ticket be marked as invalid?

  3. Adriano Paladini 2011-04-15

    Yes, this ticket can be marked as invalid.

    Thanks!

  4. Stephen Tramer 2011-04-15

    Marking invalid, as above.

  5. Lee Morris 2017-03-23

    Closing ticket as invalid.

JSON Source