hi,
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
hi,
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
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
I've solved with
canvas.setChildIndex(dragPanel,canvas.getChildren().length-1);