View Full Version : Gradient Selection background color for DataGrid,Tree,List ... etc.
springframework
12-01-2007, 12:20 AM
i have seen this done before.
but i cant figure out how to accomplish this.
does anyone know a way how?
Jesse Couch Actionscript 3.0 vancouver (http://www.jessecouch.com)
dr_zeus
12-03-2007, 06:36 PM
The selection color is drawn by the component itself. Check out the drawSelectionIndicator() function in ListBase. It's protected (at least in Flex 3, which I'm looking at right now), so you should be able to easily override it in a subclass and draw the gradient instead of a solid color.
springframework
12-05-2007, 08:27 PM
thanks it worked perfect
so in AS3 I can override protected functions even though im not doing it within the same package? it seems like protected just means public?
Jesse Couch Actionscript 3.0 vancouver (http://www.jessecouch.com)
springframework
12-05-2007, 10:16 PM
do you know of a way i can have more control over the label?
would an itemRenderer give you the most control?
Jesse Couch Actionscript 3.0 vancouver (http://www.jessecouch.com)
dr_zeus
12-06-2007, 06:01 PM
thanks it worked perfect
so in AS3 I can override protected functions even though im not doing it within the same package? it seems like protected just means public?
Jesse Couch Actionscript 3.0 vancouver (http://www.jessecouch.com)
Anything, anywhere can access something that's public.
Anything in the same package may access something that's internal.
Only subclasses may access something that's protected.
Only the class itself may access something that's private.
dr_zeus
12-06-2007, 06:02 PM
do you know of a way i can have more control over the label?
would an itemRenderer give you the most control?
Jesse Couch Actionscript 3.0 vancouver (http://www.jessecouch.com)
A custom item renderer would give you complete control.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.