Flex: Setting cornerRadius of VBox, HBox, Canvas, etc

by dcolumbus on June 4, 2009

I would consider this to be a bug within the Flex framework. If you would like to set the cornerRadius of a VBox, HBox, Canvas or most other container components, make sure you define the following:

borderStyle="solid" borderThickness="0" cornerRadius="20"

Example:

<mx:Vbox height="100" width="100" borderStyle="solid" borderThickness="0" cornerRadius="20">
</mx>
Bookmark and Share

{ 2 comments… read them below or add one }

lqiao March 11, 2010 at 9:46 am

why? borderThickness=”0″,

borderThickness=”2″, why not work?

dcolumbus March 12, 2010 at 3:05 am

You can have a borderThickness of 2 if you’d like. It seems that the border must be defined if you plan to have a cornerRadius, that’s all.

Leave a Comment