Flex VBox边框

Ste*_*Kuo 1 apache-flex flash

如何为Flex添加边框VBox?我VBox是a的渲染器List.我试过以下但没有成功(特别VBoxborderVisible="true" borderStyle="solid" borderColor="0x888888"):

 <mx:List id="myList" dataProvider="{myData}"
     width="100%" height="100%"
     variableRowHeight="true"
     verticalScrollPolicy="auto" horizontalScrollPolicy="auto">
     <mx:itemRenderer>
         <mx:Component>
             <mx:VBox
                 width="100%" height="100%"
                 verticalScrollPolicy="off" horizontalScrollPolicy="off"
                 borderVisible="true" borderStyle="solid" borderColor="0x888888">
                 <mx:HBox width="100%">
                     <mx:Label id="firstNameLabel" text="{data.firstName}"/>
                     <mx:Label id="lastNameLabel" text="{data.lastName}"/>
                 </mx:HBox>
                 <mx:Text id="descriptionLabel" text="{data.description}"/>
             </mx:VBox>
         </mx:Component>
     </mx:itemRenderer>
 </mx:List>
Run Code Online (Sandbox Code Playgroud)

Sly*_*nal 6

borderVisibleFlex Container类没有样式或属性.

看到一个边界,你需要设置borderStyle,borderColorborderThickness样式.

为VBox尝试以下样式:

         <mx:VBox
             borderThickness="1" borderStyle="solid" borderColor="0x888888" ...>

             ...

         </mx:VBox>
Run Code Online (Sandbox Code Playgroud)