Hi all,

In the process of creating this sample, I learned a couple of things about the DataGrid control that might be useful to others and Adobe.  The following highlighted items are the new CSS properties that I used:

 headerColors:  #999999, white, white; 
 headerColorsRatios: 0, 60, 255;
 headerColorsAlphas: .6, .4, 1;
 headerSeparatorSkin:ClassReference("skins.DataGridHeaderSeparator");
 rollOverColor:  white;
 rollOverColorAlpha: .3;
 selectionColor:  white;
 selectionColorAlpha:.4;
 caretColor:   #DDDDDD;
 caretColorAlpha: 1;

Observations:

1. The headerColors drawn are actually three colors instead of two.  The first and second colors drawn are hardcoded to use the first headerColor in the array.  The third color drawn uses the second headerColor in the array.  Changed the CSS to allow three different colors.

2. When making the headers transparent, the headerSeparator doesn't line-up correctly.  Used a headerSeparatorSkin.

3. A "caret" is the outline border around the selected item.

4. By default, the caret is drawn only when the user selects an item with keyboard navigation.  However, once activated, the caret is drawn when an item is selected with the mouse as well.  I liked the look of the caret, so I activated it when the item is selected (either way).  Also, added the ability to change the caret color and alpha.  Some might also like to see the caret when an item is highlighted, but I didn't want to mess with the drawItem() function.

4. The drawItem() function in the ListBase class is used to draw a sprite for the selected or highlighted cell.  However, this function is overriden in the DataGridBase class to repeat for each cell on the row.

5. The applySelectionEffect() function has hardcoded tween alpha values from 0 to 1.

6. The ListBase class uses a couple of private functions to handle the tween effect.  These must be copied, as well as any necessary imports, into the subclass. 

Wish List: (I know, not the right place for this, but related none the less)

1. CSS properties listed above.
2. Conditional row and item colors. (see RowColorDataGrid)
3. Persistent sort orders.  The sort is reset when the dataProvider is refreshed with new data.  It would be nice to have a CSS Boolean property to swithch this behavior on or off.

I'm mentioning these observations, not to criticize, but rather to offer suggestions that might be incorporated into a future release.   My thought is, if you offer a backgroundAlpha property for a composite control or composite container (Panel), the developer should also have control over alpha values for the other parts of the control.  Yes, you can apply an alpha value for the entire control, but this might not always be suitable or as easy to read.  Just observations and constructive suggestions.

-TH
_______________________________

Tim Hoff
Cynergy Systems, Inc
http://www.CynergySystems.com 
Office:  1.866.CYNERGY

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to