Skip to content

Instantly share code, notes, and snippets.

@milon120203
Created April 19, 2018 18:35
Show Gist options
  • Save milon120203/0159ee06178c13ef29905c8a04b983ad to your computer and use it in GitHub Desktop.
Save milon120203/0159ee06178c13ef29905c8a04b983ad to your computer and use it in GitHub Desktop.
Level Wrapping
var win = Ti.UI.createWindow({
backgroundColor : 'white',
exitOnClose : true,
fullscreen : false,
layout : 'vertical',
title : 'Label Demo'
});
var label2 = Ti.UI.createLabel({
color : 'blue',
text : 'A long label with a few line breaks and unicode (UTF8) symbols such as a white chess piece \u2655 and the euro symbol \u20ac looks like this! ',
textAlign : Ti.UI.TEXT_ALIGNMENT_LEFT,
//top : 30,
width : 200,
height : 100,
backgroundColor:'red',
lines: 1,
//layout:'horizontal',
//horizontalWrap: true,
//wordWrap: true,
ellipsize: true
});
win.add(label2);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment