Flex MX文本不垂直对齐,但是其他组件可以对齐
||
我在mxml中有以下代码布局。该按钮将正确地定位在中间,但文本仍锚定在顶部。这不是spark组件标签的行为,但是我需要在文本中运行多个样式,并且发现mxText组件是最好的解决方案...
<s:Group>
<s:layout>
<s:HorizontalLayout verticalAlign=\"middle\" gap=\"0\" />
</s:layout>
<mx:Text id=\"title\"
htmlText=\"{sourcecodehere}\"
width=\"212\"
height=\"55\"
textAlign=\"center\"
/>
<s:Button id=\"getNow\"
label=\"Get Now\" skinClass=\"skins.CustomButton\"
verticalCenter=\"middle\"
click=\"getNowEventHandler()\" />
</s:Group>
我正在使用Flex 4,我知道我可能应该使用Spark Text组件,但是我对htmlText的实现非常满意,我不想继续...
没有找到相关结果
已邀请:
1 个回复
藐刚
并将其放在按钮上来举例说明。现在,Label仅占用所需的空间,然后将其居中。 为什么要像这样将标签硬编码为55?