Request ellipsize at last line of Ti.UI.Label while still using wordWrap
Currently, in order to make a label use ellipsize we have to set wordWrap to false.
Our project requires a multilined label that ends with an ellipsize.
We could do this with multiple labels, but it is used often enough and should be less resource intensive
to simply add this functionality to Label.
Example code
var win = Ti.UI.createWindow({
backgroundColor:'#555'
});
var label = Ti.UI.createLabel({
backgroundColor: '#FFF',
borderWidth: 1,
borderColor: '#000',
width: 200,
height: 44,
fontSize: 14,
ellipsize: true,
wordWrap: true,
verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP,
text: 'I used to be an adventurer like you until I took an arrow to the knee'
});
win.add(label);
win.open();
The desired effect is a label with 2 lines
I used to be an adventurer
like you until I took an...
Unfortunately we can't implement this feature because there simply is no way to do it. The "text-overflow" CSS property must be set to "nowrap" in order for ellipses to appear. For more information see http://www.quirksmode.org/css/textoverflow.html