Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3265] iOS: textArea height and width 'auto'

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2012-05-03T16:27:46.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsautosize, feature, ios, rplist, textarea
ReporterAlan Leard
AssigneeMarshall Culpepper
Created2011-04-15T03:40:49.000+0000
Updated2017-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

Comments

  1. Stephen Tramer 2012-05-03

    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.
  2. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source