<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating a simple TLF TextContainerManager in Flex 4</title>
	<atom:link href="http://blog.flexexamples.com/2009/07/16/creating-a-simple-tlf-textcontainermanager-in-flex-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2009/07/16/creating-a-simple-tlf-textcontainermanager-in-flex-4/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dan</title>
		<link>http://blog.flexexamples.com/2009/07/16/creating-a-simple-tlf-textcontainermanager-in-flex-4/comment-page-1/#comment-9132</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 12 Apr 2011 14:56:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1216#comment-9132</guid>
		<description>How do you add a border to text elements using TLF? This seems like something that should be extremely simple yet I&#039;ve been hunting for days.  I&#039;m currently doing something like this:

&lt;code&gt;
protected var _textFlow:TextFlow;
protected var _editManager:EditManager;

var _textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
// I add a whole bunch of formatting such as:
_textLayoutFormat.color = 0xff0000;
_textLayoutFormat.fontFamily = &quot;Arial, Helvetica, _sans&quot;;
//but of course there&#039;s no border-like settings here.

_textFlow = new TextFlow();
_textFlow.hostFormat = _textLayoutFormat;
_textFlow.flowComposer = new StandardFlowComposer();
_textFlow.flowComposer.addController(new ContainerController(this));
_editManager = new EditManager();
_textFlow.interactionManager = _editManager;
_textFlow.flowComposer.updateAllControllers();

// ... and later to &quot;activate&quot; it...

_textFlow.interactionManager.selectRange(0,0);
_editManager.setFocus();
&lt;/code&gt;

I was playing around with a TextContainerManager before, too... but I guess I just didn&#039;t understand it enough. I see on help.adobe.com it says about the drawBackgroundAndSetScrollRect method, &quot;&lt;i&gt;Override this method to draw a background or a border. Overriding this method can be tricky as the scrollRect must be set as specified.&lt;/i&gt;&quot;

I guess I&#039;ll look into that, although... I&#039;m not sure where to begin yet.  (Any recommendations?)</description>
		<content:encoded><![CDATA[<p>How do you add a border to text elements using TLF? This seems like something that should be extremely simple yet I&#8217;ve been hunting for days.  I&#8217;m currently doing something like this:</p>
<p><code><br />
protected var _textFlow:TextFlow;<br />
protected var _editManager:EditManager;</p>
<p>var _textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();<br />
// I add a whole bunch of formatting such as:<br />
_textLayoutFormat.color = 0xff0000;<br />
_textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";<br />
//but of course there's no border-like settings here.</p>
<p>_textFlow = new TextFlow();<br />
_textFlow.hostFormat = _textLayoutFormat;<br />
_textFlow.flowComposer = new StandardFlowComposer();<br />
_textFlow.flowComposer.addController(new ContainerController(this));<br />
_editManager = new EditManager();<br />
_textFlow.interactionManager = _editManager;<br />
_textFlow.flowComposer.updateAllControllers();</p>
<p>// ... and later to "activate" it...</p>
<p>_textFlow.interactionManager.selectRange(0,0);<br />
_editManager.setFocus();<br />
</code></p>
<p>I was playing around with a TextContainerManager before, too&#8230; but I guess I just didn&#8217;t understand it enough. I see on help.adobe.com it says about the drawBackgroundAndSetScrollRect method, &#8220;<i>Override this method to draw a background or a border. Overriding this method can be tricky as the scrollRect must be set as specified.</i>&#8221;</p>
<p>I guess I&#8217;ll look into that, although&#8230; I&#8217;m not sure where to begin yet.  (Any recommendations?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.flexexamples.com/2009/07/16/creating-a-simple-tlf-textcontainermanager-in-flex-4/comment-page-1/#comment-4692</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Thu, 23 Jul 2009 02:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1216#comment-4692</guid>
		<description>I was using Flex Builder 3. It&#039;s good to know that Flash Builder will help me avoid forgetting that setting though.</description>
		<content:encoded><![CDATA[<p>I was using Flex Builder 3. It&#8217;s good to know that Flash Builder will help me avoid forgetting that setting though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/07/16/creating-a-simple-tlf-textcontainermanager-in-flex-4/comment-page-1/#comment-4612</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 17 Jul 2009 19:26:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1216#comment-4612</guid>
		<description>Rob,

Out of curiosity, are you using Flex Builder 3, or Flash Builder 4 beta? If you are using FB4, it should correct the Player version automatically based on the current SDK version (unless you disabled that).

Peter</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>Out of curiosity, are you using Flex Builder 3, or Flash Builder 4 beta? If you are using FB4, it should correct the Player version automatically based on the current SDK version (unless you disabled that).</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob McKeown</title>
		<link>http://blog.flexexamples.com/2009/07/16/creating-a-simple-tlf-textcontainermanager-in-flex-4/comment-page-1/#comment-4610</link>
		<dc:creator>Rob McKeown</dc:creator>
		<pubDate>Fri, 17 Jul 2009 18:34:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1216#comment-4610</guid>
		<description>Ok... slightly embarrassed now. I forgot to change the required Flash player version to 10 in the projects properties.</description>
		<content:encoded><![CDATA[<p>Ok&#8230; slightly embarrassed now. I forgot to change the required Flash player version to 10 in the projects properties.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob McKeown</title>
		<link>http://blog.flexexamples.com/2009/07/16/creating-a-simple-tlf-textcontainermanager-in-flex-4/comment-page-1/#comment-4609</link>
		<dc:creator>Rob McKeown</dc:creator>
		<pubDate>Fri, 17 Jul 2009 18:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1216#comment-4609</guid>
		<description>I must be missing something because this doesn&#039;t appear to compile even when using the nightly (8654 build) SDK. I get several &quot;Type was not found or was not a compile-time constant&quot; errors pointing at TextBlock and TextLine as the missing classes.</description>
		<content:encoded><![CDATA[<p>I must be missing something because this doesn&#8217;t appear to compile even when using the nightly (8654 build) SDK. I get several &#8220;Type was not found or was not a compile-time constant&#8221; errors pointing at TextBlock and TextLine as the missing classes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

