开发者

FLEX: how to assign different z-index?

I have a canvas with a mxml 开发者_开发技巧component and I'm dynamically adding components to the canvas.

These components are overlying the mxml component. How can I keep the mxml component on top ?

thanks


I've solved with

canvas.setChildIndex(dragPanel,canvas.getChildren().length-1);


Lay down a container component (VBox/HBox or similar), then your component. Then add the new items to the container that lies under the MXML component, as follows:

Canvas
|
----------------VBox
|               |
|               |
----MXMLComp    ----Dynamic added component
                |
                |
                ----Dynamic added component
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜