The approach in the sample is for people who want to make custom look for their Flex applications, but do not want to learn Flash. I could also use drawing API which would provide better performance, but I do believe that you need to get the matching set of icons from the UI you are trying to immitate, have designer to scale it to the size used in Flex and apply colors to look "compatible" with the skin you are using. As such, full exposure of TreeRow class will be ultimately necessary to make adjustments to the margins/padding/connectivity of the lines within/over rows. HTH, Anatole [EMAIL PROTECTED]
----- Original Message ----- From: "Theodore E Patrick" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, January 03, 2006 9:06 AM Subject: RE: [flexcoders] Re: ANY FLEX TREE GURUS? > Yes exactly. > > The icons used for the tree, would be SWF used through > icon="@Embed('icon.swf')". These icons would have some drawing API calls > in > them allowing them to draw the lines as they are rendered. The icon is > placed by the tree, the icon just needs to use the drawing API to render > its > drawing parts into a nested MovieClip. > > That said, I liked the example posted to this thread earlier. It extended > the TreeRow class and added the lines via the drawing API in a similar > manner as rows were rendered. This looked to be a much more reusable > solution as it did not affect the icons in use but rather just modified > the > way rows were rendered in the tree. Plus there is something to be said for > a > working example. > > My 2 cents, > > Ted Patrick > Cynergy Systems > >> -----Original Message----- >> From: [email protected] [mailto:[EMAIL PROTECTED] On >> Behalf Of sufibaba >> Sent: Tuesday, January 03, 2006 3:23 AM >> To: [email protected] >> Subject: [flexcoders] Re: ANY FLEX TREE GURUS? >> >> Hi Ted, >> >> Thanks for your thoughts on this . Looks like the first method you've >> suggested is the better option. >> >> Question: I am a bit unclear about using the Drawing API embedded into >> SWF Icons. Are you suggesting to have code inside of the SWF that >> would render the lines according to it's position in the tree? Am I >> understanding this correctly. >> >> Tim >> >> >> >> >> >> --- In [email protected], "Theodore E Patrick" <[EMAIL PROTECTED]> >> wrote: >> > >> > Tim, >> > >> > >> > >> > I think this would best be done via the Drawing API embedded into >> SWF Icons >> > in Flex 1.5 and Flex 2. >> > >> > >> > >> > Node Icons would need to draw this: >> > >> > >> > >> > -----ICON >> > >> > >> > >> > Container Icons would need to draw this: >> > >> > >> > >> > -----ICON >> > >> > | >> > >> > | >> > >> > | >> > >> > >> > >> > Since each Icon knows its position, it can readily draw the lines >> > consistently. >> > >> > >> > >> > The trick here is that icons are refreshed in the Tree whenever the >> > view >> > changes. As they are attached anew, they would simply render out the >> state >> > of the tree. >> > >> > >> > >> > The other route would be to use the drawing API and render the lines >> in a MC >> > behind the tree based on the state of the DataProvider. I think this >> route >> > would be more difficult as you would need to draw the nested state >> of all >> > nodes at one time. >> > >> > >> > >> > With the prior method only the changes portion of the drawing changes >> > as >> > needed. I believe that depths get higher as you move south on the >> tree. If a >> > parent draws a line all sibling and child nodes will naturally be >> above the >> > drawn lines. >> > >> > >> > >> > My 2 cents, >> > >> > >> > >> > Ted Patrick >> > >> > Cynergy Systems >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > _____ >> > >> > From: [email protected] [mailto:[EMAIL PROTECTED] On >> > Behalf Of sufibaba >> > Sent: Monday, January 02, 2006 12:39 AM >> > To: [email protected] >> > Subject: [flexcoders] ANY FLEX TREE GURUS? >> > >> > >> > >> > Happy New years to All, >> > >> > Does anyone know how to Modify the Flex2 Tree component to display >> connector >> > lines -- Like the one shown under "Rich Graphics" at the following >> > Link: >> > >> > HYPERLINK >> > >> "http://javascript.cooldev.com/scripts/cooltree/demos/superdemo/"http://ja >> va >> > script.cooldev.com/scripts/cooltree/demos/superdemo/ >> > >> > I know that flash is much more capable than javascript and the menu >> system >> > can be even more robust than javascript or Java. Is it possible to >> do this >> > in Flex2. >> > >> > Cheers, >> > >> > Tim >> > >> > >> > >> > -- >> > Flexcoders Mailing List >> > FAQ: HYPERLINK >> > >> "http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt"http://g >> ro >> > ups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt >> > Search Archives: HYPERLINK >> > >> "http://www.mail-archive.com/flexcoders%40yahoogroups.com"http://www.mail- >> ar >> > chive.com/flexcoders%40yahoogroups.com >> > >> > >> > >> > >> > _____ >> > >> > YAHOO! GROUPS LINKS >> > >> > >> > >> > * Visit your group "HYPERLINK >> > "http://groups.yahoo.com/group/flexcoders"flexcoders" on the web. >> > >> > * To unsubscribe from this group, send an email to: >> > HYPERLINK >> > >> "mailto:flexcoders- >> [EMAIL PROTECTED]"flexcoder >> > [EMAIL PROTECTED] >> > >> > * Your use of Yahoo! Groups is subject to the HYPERLINK >> > "http://docs.yahoo.com/info/terms/"Yahoo! Terms of Service. >> > >> > >> > >> > _____ >> > >> > >> > -- >> > No virus found in this incoming message. >> > Checked by AVG Free Edition. >> > Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: >> 1/2/2006 >> > >> > >> > >> > -- >> > No virus found in this outgoing message. >> > Checked by AVG Free Edition. >> > Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: >> 1/2/2006 >> > >> >> >> >> >> >> >> -- >> Flexcoders Mailing List >> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt >> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com >> Yahoo! Groups Links >> >> >> >> >> >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006 >> > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 1/2/2006 > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

