[TIMOB-3265] iOS: textArea height and width 'auto'
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-05-03T16:27:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | autosize, feature, ios, rplist, textarea |
Reporter | Alan Leard |
Assignee | Marshall Culpepper |
Created | 2011-04-15T03:40:49.000+0000 |
Updated | 2017-03-20T20:38:31.000+0000 |
Description
Problem
When using a textArea, there is no way to make the field auto expand to fit the text. The only option is that the text will scroll. Label is able to produce the desired results. See test code.
Sample Code
var win = Titanium.UI.createWindow();
var textArea = Ti.UI.createTextArea({
width:200,
height:'40',
top:10,
value:'test'
});
var label = Ti.UI.createLabel({
backgroundColor:'#fff',
width:200,
height:'auto',
top:60,
text:textArea.value
});
win.add(textArea);
win.add(label);
textArea.addEventListener('change', function(e){
label.text=e.value;
});
win.open();
Related Documentation
Ticket Reference: http://developer.appcelerator.com/helpdesk/view/76226">http://developer.appcelerator.com/helpdesk/view/76226
Ticket does not describe an actual problem; describes desired behavior and additionally the test is incorrect. Layout also translates 'auto' and SIZE correctly for text fields now.
Closing ticket as invalid.