<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Removing leaf icons from the Flex Tree control</title>
	<link>http://blog.flexexamples.com/2008/01/25/removing-leaf-icons-from-the-flex-tree-control/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 21 Nov 2008 05:01:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: judah</title>
		<link>http://blog.flexexamples.com/2008/01/25/removing-leaf-icons-from-the-flex-tree-control/#comment-15030</link>
		<author>judah</author>
		<pubDate>Sat, 30 Aug 2008 05:42:41 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/25/removing-leaf-icons-from-the-flex-tree-control/#comment-15030</guid>
		<description>Hi Peter,

I'm trying to write a tutorial on creating a simple item renderer for the Tree control. Unfortunately I haven't seen one example online where an item renderer is created in MXML. Can you be the first to create one? In my example I'm using the tree to show a list of items exactly the same as one of the blocks on the sidebar here, http://www.flexcapacitor.com/developer/. At that link I want to replicate the look of the pages section. 

This is the code I have so far and it all falls apart:
&lt;pre class="code"&gt;
&#60;mx:Tree left="8" rowHeight="16" 
	dataProvider="{pages1}" labelField="title" width="100%" 
	styleName="sideBarTreeStyle" height="0%" alpha="1" indentation="10"
	creationComplete="{event.currentTarget.openItems = pages1}"&#62;
	&#60;mx:itemRenderer&#62;
		&#60;mx:Component&#62;
			&#60;mx:Canvas width="100%" height="100%"&#62;
				&#60;mx:Script&#62;
					&#60;![CDATA[
						import mx.controls.Tree;
					]]&#62;
				&#60;/mx:Script&#62;
				&#60;mx:HBox width="100%" horizontalGap="0" height="100%"&#62;
				&#60;mx:Image source="images/list_bullet.png" 
				horizontalAlign="center" verticalAlign="middle"
					visible="{(!Tree(owner).dataDescriptor.isBranch(data))}"
					includeInLayout="{(!Tree(owner).dataDescriptor.isBranch(data))}"
					height="100%"/&#62; 
				&#60;mx:Label text="{data.title}" height="100%" width="100%"/&#62;
				&#60;/mx:HBox&#62;
			&#60;/mx:Canvas&#62;
		&#60;/mx:Component&#62;
	&#60;/mx:itemRenderer&#62;
&#60;/mx:Tree&#62;
&lt;/pre&gt;

With this code the indentation is messed up, the label is not positioned correctly and the image is not positioned correctly. Basically everything in my component is not positioned correctly. This code works fine in a list component?

Judah
PS You've got to get this installed on this blog, http://txfx.net/code/wordpress/subscribe-to-comments/</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I&#8217;m trying to write a tutorial on creating a simple item renderer for the Tree control. Unfortunately I haven&#8217;t seen one example online where an item renderer is created in MXML. Can you be the first to create one? In my example I&#8217;m using the tree to show a list of items exactly the same as one of the blocks on the sidebar here, <a href="http://www.flexcapacitor.com/developer/." rel="nofollow">http://www.flexcapacitor.com/developer/.</a> At that link I want to replicate the look of the pages section. </p>
<p>This is the code I have so far and it all falls apart:</p>
<pre class="code">
&lt;mx:Tree left="8" rowHeight="16"
	dataProvider="{pages1}" labelField="title" width="100%"
	styleName="sideBarTreeStyle" height="0%" alpha="1" indentation="10"
	creationComplete="{event.currentTarget.openItems = pages1}"&gt;
	&lt;mx:itemRenderer&gt;
		&lt;mx:Component&gt;
			&lt;mx:Canvas width="100%" height="100%"&gt;
				&lt;mx:Script&gt;
					&lt;![CDATA[
						import mx.controls.Tree;
					]]&gt;
				&lt;/mx:Script&gt;
				&lt;mx:HBox width="100%" horizontalGap="0" height="100%"&gt;
				&lt;mx:Image source="images/list_bullet.png"
				horizontalAlign="center" verticalAlign="middle"
					visible="{(!Tree(owner).dataDescriptor.isBranch(data))}"
					includeInLayout="{(!Tree(owner).dataDescriptor.isBranch(data))}"
					height="100%"/&gt;
				&lt;mx:Label text="{data.title}" height="100%" width="100%"/&gt;
				&lt;/mx:HBox&gt;
			&lt;/mx:Canvas&gt;
		&lt;/mx:Component&gt;
	&lt;/mx:itemRenderer&gt;
&lt;/mx:Tree&gt;
</pre>
<p>With this code the indentation is messed up, the label is not positioned correctly and the image is not positioned correctly. Basically everything in my component is not positioned correctly. This code works fine in a list component?</p>
<p>Judah<br />
PS You&#8217;ve got to get this installed on this blog, <a href="http://txfx.net/code/wordpress/subscribe-to-comments/" rel="nofollow">http://txfx.net/code/wordpress/subscribe-to-comments/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Solntcev</title>
		<link>http://blog.flexexamples.com/2008/01/25/removing-leaf-icons-from-the-flex-tree-control/#comment-14388</link>
		<author>Ivan Solntcev</author>
		<pubDate>Tue, 29 Jul 2008 12:08:35 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/25/removing-leaf-icons-from-the-flex-tree-control/#comment-14388</guid>
		<description>Thank you, useful post.</description>
		<content:encoded><![CDATA[<p>Thank you, useful post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick T Evans</title>
		<link>http://blog.flexexamples.com/2008/01/25/removing-leaf-icons-from-the-flex-tree-control/#comment-14184</link>
		<author>Patrick T Evans</author>
		<pubDate>Wed, 16 Jul 2008 21:15:59 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/01/25/removing-leaf-icons-from-the-flex-tree-control/#comment-14184</guid>
		<description>This does not work for me in Flex 3. The folders still remain</description>
		<content:encoded><![CDATA[<p>This does not work for me in Flex 3. The folders still remain</p>
]]></content:encoded>
	</item>
</channel>
</rss>
