apache-flex - 在 Flex 中定位文本

标签 apache-flex

我想在 VBox 下方的一行中显示三个不同的文本片段,因此我创建了一个 HBox 并将文本组件放置在此处:

<mx:HBox width="100%">
    <mx:Text text="left" id="textLeft"/>
    <mx:Text text="center" id="textCenter"/>
    <mx:Text text="right" id="textRight"/>
</mx:HBox>

我希望 id 为“textLeft”的文本位于 HBox 的最左侧,textCenter 位于中间,textRight 位于右侧...

任何解决方案/指针表示赞赏。

最佳答案

尝试

<mx:HBox width="100%">
    <mx:Text text="left" id="textLeft"/>
    <mx:Spacer width="100%" />
    <mx:Text text="center" id="textCenter"/>
    <mx:Spacer width="100%" />
    <mx:Text text="right" id="textRight"/>
</mx:HBox>

   <mx:HBox width="100%">
        <mx:Text text="left" id="textLeft" textAlign="left" width="100%"/>
        <mx:Text text="center" id="textCenter"  textAlign="center" width="100%"/>
        <mx:Text text="right" id="textRight"  textAlign="right" width="100%"/>
   </mx:HBox>

就我个人而言,我会选择排名第一的

关于apache-flex - 在 Flex 中定位文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/995759/

相关文章:

apache-flex - HttpSession session ID 与 FlexSession ID 不同

xml - 将xml更改为数组的更快方法(可以伸缩)

android - 有没有办法隐藏正在运行的 Flex 移动应用程序或更改其名称?

c++ - Flex -- C++ 连接?

apache-flex - 有没有办法覆盖 ActionScript 运算符,特别是我想覆盖等号运算符

html - Adobe Flex 会死吗?您能推荐一个网络+移动应用程序替代品吗?

apache-flex - 弹性 : Determine if a component is showing

apache-flex - 通过 Flex-Actionscript 更改 Internet Explorer 中的窗口标题

apache-flex - Flex中的音频播放器