flex的Accordion组件头部文本默认是居左的,可以通过设置headerStyleName属性使之居中,另外还可以设置字体的样式等

 <?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%" height="100%"> <fx:Script>
<![CDATA[
import mx.collections.ArrayCollection; [Bindable]
private var sex:ArrayCollection = new ArrayCollection(
[{name:"男", value:1}, {name:"女", value:2}]);
]]>
</fx:Script> <fx:Style>
.accordionHeader{textAlign:center;fontWeight:bold; fontSize:12}
</fx:Style> <mx:Accordion width="200" height="80%" left="20" top="20"
headerStyleName="accordionHeader">
<s:NavigatorContent width="100%" height="100%" label="个人信息" >
<s:VGroup width="100%" height="100%" top="10" gap="10">
<s:HGroup width="100%" horizontalAlign="center">
<s:Label text="姓名:" verticalAlign="middle" height="25"/>
<s:TextInput width="100" height="25"/>
</s:HGroup>
<s:HGroup width="100%" horizontalAlign="center">
<s:Label text="性别:" verticalAlign="middle" height="25"/>
<s:DropDownList width="100" height="25" dataProvider="{sex}"
labelField="name" prompt="保密"/>
</s:HGroup>
<s:HGroup width="100%" horizontalAlign="center">
<s:Label text="年龄:" verticalAlign="middle" height="25"/>
<s:TextInput width="100" height="25" restrict="0-9" maxChars="2"/>
</s:HGroup>
<s:HGroup width="100%" horizontalAlign="center">
<s:Label text="职业:" verticalAlign="middle" height="25"/>
<s:TextInput width="100" height="25"/>
</s:HGroup>
<s:HGroup width="100%" horizontalAlign="center">
<s:Label text="住址:" verticalAlign="middle" height="25"/>
<s:TextInput width="100" height="25"/>
</s:HGroup>
</s:VGroup>
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%" label="情况反馈">
<s:VGroup width="100%" height="100%" top="10" gap="10"
horizontalAlign="center">
<s:Label text="个人情况反馈" verticalAlign="middle" fontWeight="bold" color="blue"/>
<s:TextArea height="80%" borderColor="black"/>
</s:VGroup>
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%" label="提交信息">
<s:VGroup width="100%" height="100%" top="10" gap="10"
horizontalAlign="center">
<s:HGroup width="100%" horizontalAlign="center">
<s:Label text="方式:" verticalAlign="middle" height="20"/>
<s:RadioButton label="匿名" groupName="radiogroup1" selected="true"/>
<s:RadioButton label="实名" groupName="radiogroup1"/>
</s:HGroup>
<s:Button width="70%" label="提 交" fontSize="14"/>
</s:VGroup>
</s:NavigatorContent>
</mx:Accordion>
</s:Application>

flex的Accordion组件头部文本居中显示的更多相关文章

  1. 重写TextView,实现圆形背景,文本居中显示

    最近,在做考试试题排版,产品提出题号希望显示成圆形背景,序号文本居中显示. (有点问题:文本没有绝对居中,暂时没做处理.) 为此,我采取的方式是重写TextView的onDraw方法,绘制一个圆形背景 ...

  2. CSS文本居中显示

    因为一直为元素居中问题而困扰,所以决定把自己遇到和看到的方法记录下来,以便以后查看 如果要让inline或inline-block元素居中显示,则父元素css中包含text-align:center; ...

  3. 自定义Toast样式-两行文本居中显示

    toast可以设置自定义的view和显示位置.下面是一个简单的例子,复杂些的就是改变其布局文件就可以了. /** * @author BMR * @ClassName: ToastWithTwoTex ...

  4. ExtJS -- Grid 文本居中显示

    Reference: http://stackoverflow.com/questions/6561120/extjs-4-apply-defaults-to-all-columns-in-a-gri ...

  5. LabelControl文本居中显示

    https://www.devexpress.com/Support/Center/Question/Details/Q94915 If you set the AutoSizeMode to Non ...

  6. css 单行文本居中显示,多行文本左对齐

    父级元素 text-align:center; 自级元素 text-align:left; display:inline-block;

  7. 【Android】自定义控件让TextView的drawableLeft与文本一起居中显示

    前言 TextView的drawableLeft.drawableRight和drawableTop是一个常用.好用的属性,可以在文本的上下左右放置一个图片,而不使用更加复杂布局就能达到,我也常常喜欢 ...

  8. line-height让文本在块级元素中居中显示总结

    一.总结: line-height不仅可以用在段落文本中控制行与行之间的间距,还可以用来控制文本在li这种块级元素中的位置. 文本行间距的大小由字体的大小决定,行间距的大小的设置方法有5种方式:

  9. 让TextView的drawableLeft与文本一起居中显示

     TextView的drawableLeft.drawableRight和drawableTop是一个常用.好用的属性,可以在文本的上下左右放置一个图片,而不使用更加复杂布局就能达到,我也常常喜欢用R ...

随机推荐

  1. SQL的IN, SOME,ANY,IN

    表dbo.Student有12条数据 name 123123123123123123123123123123123123大雄1阿华浩然菊花大姐123123 1.some,any用法一样(不知道有没有其 ...

  2. [转]Java 内部类笔记

    内部类是指在一个外部类的内部再定义一个类.内部类作为外部类的一个成员,并且依附于外部类而存在的.内部类可为静态,可用protected和private修饰(而外部类只能使用public和缺省的包访问权 ...

  3. Perl中的正则表达式

    转自:http://c20031776.blog.163.com/blog/static/684716252013624383887/ Perl 程序中,正则表达式有三种存在形式 分别是 (1 模式匹 ...

  4. ***Linux文件夹文件创建、删除、改名

    Linux删除文件夹命令 linux删除目录很简单,很多人还是习惯用rmdir,不过一旦目录非空,就陷入深深的苦恼之中,现在使用rm -rf命令即可.直接rm就可以了,不过要加两个参数-rf 即:rm ...

  5. jquery easy ui 1.3.4 数据表格(DataGrid)(8)

    8.1.创建DataGrid html代码 <table id="dg"></table> $("#dg").datagrid({ // ...

  6. C++ Primer与c++编程思想的比较(转)

    C++primer是最经典的c++教材之一,它的经典程度要超过thinking in c++.连thinking in c++作者本人都说他写这本书在某种程度上是让读者更好的理解C++primer.但 ...

  7. 在虚拟机环境下,电脑间拷贝配置好的伪分布式Hadoop环境,出现namenode不能启动的问题!

    原因:在原来的电脑上配置伪分布的时候,已经将hostname与IP绑定了,所以拷贝到别的电脑的时候,重新启动的时候就会失败,因为新的电脑的IP不见得就和原来的电脑的IP一样!因为在不同的网络中,在NA ...

  8. Jquery 文档的各种高度和宽度

    $(document).ready(function() { alert($(window).height()); //浏览器时下窗口可视区域高度 alert($(document).height() ...

  9. 【转】apache kafka技术分享系列(目录索引)

    转自:  http://blog.csdn.net/lizhitao/article/details/39499283   估计大神会不定期更新,所以还是访问这个链接看最新的目录list比较好 apa ...

  10. LR结构图