FLEX: how can I set bottom-left coordinate of my component instead of the top-left
I've some components with dynamic heights. They have to be aligned with respect to the bottom of my canvas container, so I cannot set the same y for all components.
I could compute their heights and successively set the y but I was wondering if there was an easier way to do it开发者_如何转开发.
thanks
You can use the bottom style of the component, but if they are stacked you'll still have to compute heights. This is something you get for free if you put your stack of components into a VBox
(or Box
with direction=vertical). You can position the VBox
wherever you want it on the canvas and set the bottom style of that to be whatever height you want from the bottom. Don't set a height on the VBox and it will just grow as big as it needs to be from the bottom.
depending on what the component is you may be able to set the rotationY to 180, which would flip it up. So as long as it would look okay upside down this might work.
精彩评论