<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
> 
<channel>
	<title>Appcelerator Developer Center Q&amp;A Tag Feed (multiline)</title> 
	<atom:link href="http://developer.appcelerator.com/questions/feed/tag/multiline" rel="self" type="application/rss+xml" /> 
	<link>http://developer.appcelerator.com/questions/feed/tag/multiline</link> 
	<description>Appcelerator Developer Center Q&amp;A feed for the tag: "multiline"</description> 
	<lastBuildDate>Mon, 20 May 2013 00:56:01 -0700</lastBuildDate> 
	<pubDate>Mon, 20 May 2013 00:56:01 -0700</pubDate>
	<copyright>Copyright (c) 2008-2013 by Appcelerator Inc.</copyright>
	<webMaster>info@appcelerator.com</webMaster>
	<generator>Appcelerator Developer Center</generator>
	<ttl>5</ttl>
	<language>en</language>
	<item>
		<title>Multiline text in table view row</title> 
		<link>http://developer.appcelerator.com/question/146698/multiline-text-in-table-view-row</link>
		<pubDate>Thu, 10 Jan 2013 03:24:57 -0800</pubDate>
		<dc:creator>Midhun MP</dc:creator> 
				<category><![CDATA[tableviewrow]]></category> 
				<category><![CDATA[ios]]></category> 
				<category><![CDATA[multiline]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/146698/multiline-text-in-table-view-row</guid>
		<description><![CDATA[Same question link in [Stack Overflow] [1]

I'm working on a tableView based application in Titanium.
I need to show long text contents in my table view rows.

This is the code I'm using to create my table view row.

    var row = Ti.UI.createTableViewRow({
        	backgroundColor : '#F0F0F0',
        	color           : 'black',
            font            : { fontSize:10 ,fontWeight:'bold',fontFamily:'Arial'},
            height          :'80',
            title			: firstRowContent
      	 });

My issue is I need to wrap the text in my table view row and need to display it in multiline.

In iOS there is `lineBreakMode` and `numberOfLines` properties. And I can easily do it.

Is there any way to do it in titanium ? I searched a lot, but everyone says that put a '**\n**' in between the text or add multiple labels.

These are the links I referred:

   1.  [multiline label][2]
   2.  [multiline text textwrap linebreaks in buttons and table view items][3]
   3.  [Display resultset (text) within a label, multiline][4]
   4.  [Multiline Label?][5]
   5.  [mutiline tablerow from database][6]

  [1]: http://stackoverflow.com/questions/14256637/multiline-text-in-tableview-row-in-titanium
  [2]: http://developer.appcelerator.com/question/54351/multiline-label
  [3]: http://developer.appcelerator.com/question/14151/multi-line-texttext-wrapline-breaks-in-buttons-and-table-view-items
  [4]: http://developer.appcelerator.com/question/59521/display-resultset-text-within-a-label-multiline
  [5]: http://developer.appcelerator.com/question/54351/multiline-label
  [6]: http://developer.appcelerator.com/question/122819/mutiline-tablerow-from-database]]></description>
		<content:encoded><![CDATA[<p>Same question link in <a href="http://stackoverflow.com/questions/14256637/multiline-text-in-tableview-row-in-titanium">Stack Overflow</a></p>

<p>I'm working on a tableView based application in Titanium.
I need to show long text contents in my table view rows.</p>

<p>This is the code I'm using to create my table view row.</p>

<pre><code>var row = Ti.UI.createTableViewRow({
        backgroundColor : '#F0F0F0',
        color           : 'black',
        font            : { fontSize:10 ,fontWeight:'bold',fontFamily:'Arial'},
        height          :'80',
        title           : firstRowContent
     });
</code></pre>

<p>My issue is I need to wrap the text in my table view row and need to display it in multiline.</p>

<p>In iOS there is <code class="codeblock codeblock-inline">lineBreakMode</code> and <code class="codeblock codeblock-inline">numberOfLines</code> properties. And I can easily do it.</p>

<p>Is there any way to do it in titanium ? I searched a lot, but everyone says that put a '<strong>\n</strong>' in between the text or add multiple labels.</p>

<p>These are the links I referred:</p>

<ol>
<li><a href="http://developer.appcelerator.com/question/54351/multiline-label">multiline label</a></li>
<li><a href="http://developer.appcelerator.com/question/14151/multi-line-texttext-wrapline-breaks-in-buttons-and-table-view-items">multiline text textwrap linebreaks in buttons and table view items</a></li>
<li><a href="http://developer.appcelerator.com/question/59521/display-resultset-text-within-a-label-multiline">Display resultset (text) within a label, multiline</a></li>
<li><a href="http://developer.appcelerator.com/question/54351/multiline-label">Multiline Label?</a></li>
<li><a href="http://developer.appcelerator.com/question/122819/mutiline-tablerow-from-database">mutiline tablerow from database</a></li>
</ol>
]]></content:encoded>
	</item>
	<item>
		<title>Display resultset (text) within a label, multiline</title> 
		<link>http://developer.appcelerator.com/question/59521/display-resultset-text-within-a-label-multiline</link>
		<pubDate>Thu, 09 Sep 2010 01:52:49 -0700</pubDate>
		<dc:creator>Florian Dehn</dc:creator> 
				<category><![CDATA[label]]></category> 
				<category><![CDATA[resultset]]></category> 
				<category><![CDATA[database]]></category> 
				<category><![CDATA[text]]></category> 
				<category><![CDATA[line]]></category> 
				<category><![CDATA[new]]></category> 
				<category><![CDATA[titanium.ui.label]]></category> 
				<category><![CDATA[multiline]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/59521/display-resultset-text-within-a-label-multiline</guid>
		<description><![CDATA[I´m actually trying to fetch some data from the underlying sqlite database on iPhone platform. This does work pretty well, indeed.

This works for simple text only. Multiline (with \n and \r) does not.

Does someone know how to solve this, how to make text coming from database come out as multi-line text?

Any help is much appreciated!]]></description>
		<content:encoded><![CDATA[<p>I´m actually trying to fetch some data from the underlying sqlite database on iPhone platform. This does work pretty well, indeed.</p>

<p>This works for simple text only. Multiline (with \n and \r) does not.</p>

<p>Does someone know how to solve this, how to make text coming from database come out as multi-line text?</p>

<p>Any help is much appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Multiline Label?</title> 
		<link>http://developer.appcelerator.com/question/54351/multiline-label</link>
		<pubDate>Fri, 20 Aug 2010 09:41:23 -0700</pubDate>
		<dc:creator>Ju Ho</dc:creator> 
				<category><![CDATA[label]]></category> 
				<category><![CDATA[multiline]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/54351/multiline-label</guid>
		<description><![CDATA[Hello there,
maybe this is a very dumb question, but i'm trying to add a multiline text into a table row.
i'm not sure if i'm doing it right.

is there a way to make a label being multiline?]]></description>
		<content:encoded><![CDATA[<p>Hello there,
maybe this is a very dumb question, but i'm trying to add a multiline text into a table row.
i'm not sure if i'm doing it right.</p>

<p>is there a way to make a label being multiline?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Multiline TableViewRow Footer</title> 
		<link>http://developer.appcelerator.com/question/126054/multiline-tableviewrow-footer</link>
		<pubDate>Mon, 26 Sep 2011 12:41:05 -0700</pubDate>
		<dc:creator>Baptiste Candellier</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[iphone]]></category> 
				<category><![CDATA[tableviewrow]]></category> 
				<category><![CDATA[footer]]></category> 
				<category><![CDATA[multiline]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/126054/multiline-tableviewrow-footer</guid>
		<description><![CDATA[I'd like to add a multiline footer to a TableView row, like the ones you can see in the iPhone settings app (in the sound settings, for example).
When I use foo.footer = 'bar', the footer text is cut with '...' (I don't know what it's called in English :p).
I've seen we can use footerView, but it's not really what I want, I'd like to keep the classic appearance.]]></description>
		<content:encoded><![CDATA[<p>I'd like to add a multiline footer to a TableView row, like the ones you can see in the iPhone settings app (in the sound settings, for example).
When I use foo.footer = 'bar', the footer text is cut with '...' (I don't know what it's called in English :p).
I've seen we can use footerView, but it's not really what I want, I'd like to keep the classic appearance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>mutiline tablerow from database</title> 
		<link>http://developer.appcelerator.com/question/122819/mutiline-tablerow-from-database</link>
		<pubDate>Tue, 19 Jul 2011 09:03:41 -0700</pubDate>
		<dc:creator>Mark Crippen</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[mobile]]></category> 
				<category><![CDATA[database]]></category> 
				<category><![CDATA[sqlite]]></category> 
				<category><![CDATA[multiline]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/122819/mutiline-tablerow-from-database</guid>
		<description><![CDATA[hey guys,
When I load my tableview from a local database, it doesnt show the whole data. In fact, it just shows the first few letters and then it puts ellipses on the end. Is there a way i can show multiline data from a database? What i would like to do is show the entire title field (approx 30 chars long) as well as an image on the left. posted below is my code

~~~
//create a tableview
var tableview = Titanium.UI.createTableView({
    	height:310,
	editable:true
});



function setData() {
	//initiate array
	var dataArray=[];
    //bootstrap database
	var db=Ti.Database.install('localfavs.db', 'sqlite_master');

    //Exec SQL statement
    var rows = db.execute('SELECT * FROM localsfavorites');
    //logs for trouble shooting 
    Titanium.API.log(&quot;rows &quot; +rows);
	//loop while row is valid
    	while (rows.isValidRow())
			{
            dataArray.push(
        {title:rows.fieldByName('description'),leftImage:'someImage.png'});
                  //create a new row dynamically    
           	rows.next();
            //puts results from above into the tableview
        	tableview.setData(dataArray);
   	 }
     
    
     //close rows
    rows.close();
	
};//setData closer
setData();
~~~]]></description>
		<content:encoded><![CDATA[<p>hey guys,
When I load my tableview from a local database, it doesnt show the whole data. In fact, it just shows the first few letters and then it puts ellipses on the end. Is there a way i can show multiline data from a database? What i would like to do is show the entire title field (approx 30 chars long) as well as an image on the left. posted below is my code
<pre class="javascript codeblock"><span class="co1">//create a tableview</span>
<span class="kw2">var</span> tableview <span class="sy0">=</span> Titanium.<span class="me1">UI</span>.<span class="me1">createTableView</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
        height<span class="sy0">:</span><span class="nu0">310</span><span class="sy0">,</span>
    editable<span class="sy0">:</span><span class="kw2">true</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp;
&nbsp;
<span class="kw2">function</span> setData<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">//initiate array</span>
    <span class="kw2">var</span> dataArray<span class="sy0">=</span><span class="br0">&#91;</span><span class="br0">&#93;</span><span class="sy0">;</span>
    <span class="co1">//bootstrap database</span>
    <span class="kw2">var</span> db<span class="sy0">=</span>Ti.<span class="me1">Database</span>.<span class="me1">install</span><span class="br0">&#40;</span><span class="st0">'localfavs.db'</span><span class="sy0">,</span> <span class="st0">'sqlite_master'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
    <span class="co1">//Exec SQL statement</span>
    <span class="kw2">var</span> rows <span class="sy0">=</span> db.<span class="me1">execute</span><span class="br0">&#40;</span><span class="st0">'SELECT * FROM localsfavorites'</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="co1">//logs for trouble shooting </span>
    Titanium.<span class="me1">API</span>.<span class="me1">log</span><span class="br0">&#40;</span><span class="st0">&quot;rows &quot;</span> <span class="sy0">+</span>rows<span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="co1">//loop while row is valid</span>
        <span class="kw1">while</span> <span class="br0">&#40;</span>rows.<span class="me1">isValidRow</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>
            <span class="br0">&#123;</span>
            dataArray.<span class="me1">push</span><span class="br0">&#40;</span>
        <span class="br0">&#123;</span>title<span class="sy0">:</span>rows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'description'</span><span class="br0">&#41;</span><span class="sy0">,</span>leftImage<span class="sy0">:</span><span class="st0">'someImage.png'</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
                  <span class="co1">//create a new row dynamically    </span>
            rows.<span class="me1">next</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
            <span class="co1">//puts results from above into the tableview</span>
            tableview.<span class="me1">setData</span><span class="br0">&#40;</span>dataArray<span class="br0">&#41;</span><span class="sy0">;</span>
     <span class="br0">&#125;</span>
&nbsp;
&nbsp;
     <span class="co1">//close rows</span>
    rows.<span class="kw3">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="br0">&#125;</span><span class="sy0">;</span><span class="co1">//setData closer</span>
setData<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>adding new line to textarea</title> 
		<link>http://developer.appcelerator.com/question/93391/adding-new-line-to-textarea</link>
		<pubDate>Thu, 23 Dec 2010 06:10:23 -0800</pubDate>
		<dc:creator>Mark v.d. Hijden</dc:creator> 
				<category><![CDATA[textarea]]></category> 
				<category><![CDATA[multiline]]></category> 
				<category><![CDATA[newline]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/93391/adding-new-line-to-textarea</guid>
		<description><![CDATA[Hello,

We have a web service that returns a text with multiple lines
example:
~~~
This is line 1 /r This is line 2 /r/r This is line 3
~~~

Now we want to maintain the lines in the text and insert it into a textarea.  How do i do that?

We now have this:
~~~
textarea = Titanium.UI.createTextArea({
    value: 'This is line 1 /r This is line 2 /r/r This is line 3', 
    top:10,
    left:10,
    color:'white',
    editable:false,
    enabled:false,
});
~~~

Thanks a lot...]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>

<p>We have a web service that returns a text with multiple lines
example:<pre class="javascript codeblock"><span class="kw1">This</span> <span class="kw1">is</span> line <span class="nu0">1</span> <span class="sy0">/</span>r <span class="kw1">This</span> <span class="kw1">is</span> line <span class="nu0">2</span> <span class="sy0">/</span>r<span class="sy0">/</span>r <span class="kw1">This</span> <span class="kw1">is</span> line <span class="nu0">3</span></pre>
Now we want to maintain the lines in the text and insert it into a textarea.  How do i do that?</p>

<p>We now have this:<pre class="javascript codeblock">textarea <span class="sy0">=</span> Titanium.<span class="me1">UI</span>.<span class="me1">createTextArea</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
    value<span class="sy0">:</span> <span class="st0">'This is line 1 /r This is line 2 /r/r This is line 3'</span><span class="sy0">,</span> 
    top<span class="sy0">:</span><span class="nu0">10</span><span class="sy0">,</span>
    left<span class="sy0">:</span><span class="nu0">10</span><span class="sy0">,</span>
    color<span class="sy0">:</span><span class="st0">'white'</span><span class="sy0">,</span>
    editable<span class="sy0">:</span><span class="kw2">false</span><span class="sy0">,</span>
    enabled<span class="sy0">:</span><span class="kw2">false</span><span class="sy0">,</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre>
Thanks a lot...</p>
]]></content:encoded>
	</item>
	<item>
		<title>multiple line on tableview row?</title> 
		<link>http://developer.appcelerator.com/question/77281/multiple-line-on-tableview-row</link>
		<pubDate>Sun, 07 Nov 2010 09:50:51 -0800</pubDate>
		<dc:creator>Josh Lewis</dc:creator> 
				<category><![CDATA[tableview]]></category> 
				<category><![CDATA[multiline]]></category> 
				<guid isPermaLink="true">http://developer.appcelerator.com/question/77281/multiple-line-on-tableview-row</guid>
		<description><![CDATA[I have my tableview that is pulling records locally as list of addresses, and I'm trying to add something along the lines of

Address (pulled from db)
x miles from location

I can add the x miles by doing the following

~~~
data.push({
				    id: rows.fieldByName('id'),
				  	lat: rows.fieldByName('lat'),
				    lon: rows.fieldByName('lon'),
				    title: rows.fieldByName('caption') + &quot;\n x miles from location&quot;,
				    info: rows.fieldByName('info'),
				    hasChild: true
~~~
and it works fine.  However, when I click the row, I DONT want it to show the 'x miles from location', thats just for this view only.

So is there another way to do it where its not actually part of the title?]]></description>
		<content:encoded><![CDATA[<p>I have my tableview that is pulling records locally as list of addresses, and I'm trying to add something along the lines of</p>

<p>Address (pulled from db)
x miles from location</p>

<p>I can add the x miles by doing the following
<pre class="javascript codeblock">data.<span class="me1">push</span><span class="br0">&#40;</span><span class="br0">&#123;</span>
                    id<span class="sy0">:</span> rows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'id'</span><span class="br0">&#41;</span><span class="sy0">,</span>
                    lat<span class="sy0">:</span> rows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'lat'</span><span class="br0">&#41;</span><span class="sy0">,</span>
                    lon<span class="sy0">:</span> rows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'lon'</span><span class="br0">&#41;</span><span class="sy0">,</span>
                    title<span class="sy0">:</span> rows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'caption'</span><span class="br0">&#41;</span> <span class="sy0">+</span> <span class="st0">&quot;<span class="es0">\n</span> x miles from location&quot;</span><span class="sy0">,</span>
                    info<span class="sy0">:</span> rows.<span class="me1">fieldByName</span><span class="br0">&#40;</span><span class="st0">'info'</span><span class="br0">&#41;</span><span class="sy0">,</span>
                    hasChild<span class="sy0">:</span> <span class="kw2">true</span></pre>and it works fine.  However, when I click the row, I DONT want it to show the 'x miles from location', thats just for this view only.</p>

<p>So is there another way to do it where its not actually part of the title?</p>
]]></content:encoded>
	</item>
</channel>
</rss>