Quantcast
Viewing latest article 9
Browse Latest Browse All 15

Text in label not filing whole label

I have a label that I've set to a particular height and width. This is on Android. I wanted ellipsize so i have to set word-wrap to false. I also wanted the text to start from the top so i added verticalAlign.

And the result, yes it started from to land have ellipsize but the text is on the first line only. No matter how long the text is, its only on the first line.

Here is the code:

var content_desc_lbl = Ti.UI.createLabel({
        left: content_title_lbl.left,
        top: 300 - content_title_lbl.top - 10 ,
        width: 240,
        height: 100,
        color: '#ccc',
        font: {fontSize:20},
        text: book.desc,
        textAlign: 'left',
        touchEnabled: false,
        backgroundColor:'red',
        ellipsize: true,
        wordWrap: false,
        verticalAlign:Titanium.UI.TEXT_VERTICAL_ALIGNMENT_TOP
    });

Viewing latest article 9
Browse Latest Browse All 15

Trending Articles