【发布时间】:2016-11-21 15:25:18
【问题描述】:
我正在狂热地尝试将窗口的标题设为多行。 我有一个相当长的标题,需要能够看到整个标题。
现在标题只是被剪掉了,如果它比窗口允许的长,就会有三个点 但是如果太长,我需要它分成两行
我当前的标记看起来像:
/////// create first starting window ////////
var startWin = Titanium.UI.createWindow({
title: 'Some really long title that has to be wrapped',
navBarHidden: false,
exitOnClose: true,
barImage: '/images/header_background.png',
titleAttributes: {
color: '#FFF',
font: {
fontSize: 20,
minFontSize: 15,
fontWeight: 'bold',
wordWrap: true
}
}
});
或者我可以使用多行标签吗?
谁有想法?
感谢
我的工作代码感谢塞巴斯蒂安
page_title = Ti.UI.createLabel({
text: 'Algorithmen',
height: 80,
left: 60,
right: 60,
textAlign: 'center',
color: '#fff',
font: {
fontSize: 18,
fontWeight: 'bold',
wordWrap: true
}
}),
startWin = Titanium.UI.createWindow({
titleControl: page_title,
navBarHidden: false,
exitOnClose: true,
barImage: '/images/header_background.png'
});
【问题讨论】: