Flex控件->BorderContainer&Group&SkinableContainer

[color=red]如何为Group设置背景色?[/color]
利用s:Rect,实例代码如下:


<s:Group width="100%" height="100%" >
<s:Rect width="100%" height="100%">
<s:fill>
<s:SolidColor color="0xffff00"/>
</s:fill>
</s:Rect>
</s:Group>


[color=red]如何遍历BorderContainer的child element?[/color]

for (var i:uint = 0; i < container.numElements; i++)
{
var graphic:UIComponent = container.getElementAt(i) as UIComponent;
}


[color=red]Container内部的Component的坐标是基于其Container的左上角坐标进行偏移的
[/color]
代码片段如下:

<s:Group id= "parent"x="200" y="200">
<s:Group id= "child" x="200" y="200"/>
</s:Group>

上边的代码中,如果parent左上角的坐标为(200, 200),则child的左上角坐标为(400, 400)

[color=red]SkinableContainer默认是空白的,没有绘图东西的部分不会响应鼠标事件,而Group则没有这种问题[/color]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值