I have been doing much research on this - including creating a custom skin but cannot seem to be able to do it. I just want to have one border around both the checkbox and label. I also want a background color which I did manage to via opaqueBackground property (setting it via AS3). Just can't seem to find the key to have a border as开发者_运维知识库 well. Any help is appreciated. I need the same for radio buttons as well.
You're on the right track by creating a custom skin. Just copy the default CheckBoxSkin and add a Rect at the top level so it gets drawn first (below where the states are declared and before the first Group):
<s:Rect left="0" right="0" top="0" bottom="0">
<s:stroke>
<s:SolidColorStroke color="#ff0000"/>
</s:stroke>
</s:Rect>
Then set your new skin as the checkbox skin, either in CSS or directly on the specific checkbox via its skinClass.
Hope that helps.
精彩评论