Rich Rodecker’s blog on flash, flex, actionscript, javascript, and php, with a dash of randomness
BorderSkin on top of children
Sheesh...I just wasted half a day trying to figure out how to get a borderSkin to appear on top of all the children in a custom component I was building. It was a subclass of Canvas, so it was really easy...now that I know, it seems so obvious I want to kick myself. Anyway, you just need to do:
Actionscript:
-
override protected function layoutChrome(unscaledWidth:Number,unscaledHeight:Number):void{
-
super.layoutChrome(unscaledWidth, unscaledHeight);
-
-
//move the border in front of the children
-
rawChildren.setChildIndex(rawChildren.getChildByName('border'), rawChildren.numChildren - 1);
-
-
}
| Print article | This entry was posted by rich on March 27, 2008 at 1:39 pm, and is filed under Flex. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

about 2 years ago
Thanks for the tip! :^)
about 4 months ago
Yep great tip! A big stupid thing from Adobe is to have made the "border" component private (mx_internal namespace) ...
Cheers!
eBuildy, Flex specialists!