On Sep 16, 2008, at 4:40 PM, djepyon wrote:
Maybe I ought to be making a container component with the CS3 export
kit, but does anyone know of a way to round bl and br on a
Box/HBox/VBox while tl and tr are square?
In my opinion, the best way is to subclass mx.skins.halo.HaloBorder.
In that new class, override the updateDisplayList method. Add
something like the following to it:
var r:Number = getStyle("cornerRadius") as Number;
if (!r) r = 0;
GraphicsUtil.drawRoundRectComplex(g, 0,0,
unscaledWidth,unscaledHeight, 0, 0, r, r);
You may need to adjust the top left and the width/height that's drawn
based on the corner radius size.
After you've done that, for each of the controls, add a line in CSS
for those controls like the following:
borderSkin: ClassReference("com.yourpath.YourBorderSkinClass");
cornerRadius: 10;
I just went through this with Panel recently because I needed a
very custom designed panel and header (for Panel, you extend
PanelSkin instead of HaloBorder). The process for the other
containers is pretty much the same.
good luck,
jon