2013-07-31 75 views
1

欲一旦測試字符串已經超過textarea的寬度textarea的水平滾動。我嘗試了下面的代碼,但是,由於某種原因它不起作用。的TextField不水平滾動文本[鈦]

我還嘗試添加一個包裝視圖滾動視圖以及將所述文本區域到包裝視圖;但那也行不通。

我該如何解決這個問題?

var scroll = Ti.UI.createScrollView({ 
    top:40, 
    left:230, 
    width:290, 
    height:50 
}); 
win.add(scroll); 

var textType = Ti.UI.createTextArea({ 
    backgroundColor:'#E6E6E6', 
    borderColor:'blue', 
    borderRadius:10, 
    top:0, 
    left:0, 
    width:290, 
    height:50, 
    font:{fontSize:26, fontFamily:customFont}, 
    editable:false, 
    enabled:false, 
    textAlign:'right', 
    scrollable:true 
    }); 
scroll.add(textType); 

回答

0

我知道這聽起來很簡單,但是,對於默認文本區域垂直滾動。這是我知道的唯一行爲。我已嘗試不同的屬性,如:

layout:"horizontal", 
    horizontalWrap:true, 
    scrollable:true, 

但是,這並沒有解決問題。