Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Tree Alternating Row Colors

Tree Alternating Row Colors

2004-03-12       - By Keith L. Miller

 Back
Reply:     1     2  

Has anyone else noticed that if you set the alternating row color style for
a tree component like this:

myTree.setStyle("alternatingRowColors",[0xffffff,0xeeeeee]);

that when you expand a branch the rows do not get colored UNTIL you move
your cursor over them?  I've written three different apps using the tree
component, and they all do this.  Is there something I'm not setting
properly?  Here's a very simple example of the code I use.  Just make a new
file, add a tree component and then paste this script.  You will also need
an XML file in the same folder called tree.xml with a few branches that have
several leafs so you can see what I'm talking about.

  // set up tree listener
   myTreeListener = new Object();

  // Define the tree controls and XML
   var myTree:mx.controls.Tree;
   var myXML:XML;
   myXML = new XML();
   myXML.ignoreWhite = true;

  // Load the XML data
   myXML.load("tree.xml");
   myXML.onLoad = function (){
    myTree.dataProvider = myXML;
  }

  // Set Tree Style
   myTree.setStyle("alternatingRowColors",[0xffffff,0xeeeeee]);


Thanks,

Keith


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106758
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)