flex的Accordion组件头部文本居中显示
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组件头部文本居中显示的更多相关文章
- 重写TextView,实现圆形背景,文本居中显示
最近,在做考试试题排版,产品提出题号希望显示成圆形背景,序号文本居中显示. (有点问题:文本没有绝对居中,暂时没做处理.) 为此,我采取的方式是重写TextView的onDraw方法,绘制一个圆形背景 ...
- CSS文本居中显示
因为一直为元素居中问题而困扰,所以决定把自己遇到和看到的方法记录下来,以便以后查看 如果要让inline或inline-block元素居中显示,则父元素css中包含text-align:center; ...
- 自定义Toast样式-两行文本居中显示
toast可以设置自定义的view和显示位置.下面是一个简单的例子,复杂些的就是改变其布局文件就可以了. /** * @author BMR * @ClassName: ToastWithTwoTex ...
- ExtJS -- Grid 文本居中显示
Reference: http://stackoverflow.com/questions/6561120/extjs-4-apply-defaults-to-all-columns-in-a-gri ...
- LabelControl文本居中显示
https://www.devexpress.com/Support/Center/Question/Details/Q94915 If you set the AutoSizeMode to Non ...
- css 单行文本居中显示,多行文本左对齐
父级元素 text-align:center; 自级元素 text-align:left; display:inline-block;
- 【Android】自定义控件让TextView的drawableLeft与文本一起居中显示
前言 TextView的drawableLeft.drawableRight和drawableTop是一个常用.好用的属性,可以在文本的上下左右放置一个图片,而不使用更加复杂布局就能达到,我也常常喜欢 ...
- line-height让文本在块级元素中居中显示总结
一.总结: line-height不仅可以用在段落文本中控制行与行之间的间距,还可以用来控制文本在li这种块级元素中的位置. 文本行间距的大小由字体的大小决定,行间距的大小的设置方法有5种方式:
- 让TextView的drawableLeft与文本一起居中显示
TextView的drawableLeft.drawableRight和drawableTop是一个常用.好用的属性,可以在文本的上下左右放置一个图片,而不使用更加复杂布局就能达到,我也常常喜欢用R ...
随机推荐
- Phoenix实现用SQL查询HBase
博客已转移,请借一步说话,http://www.weixuehao.com/archives/111 HBase,一个NoSQL数据库,可存储大量非关系型数据. HBase,可以用HBase shel ...
- lucene 搜索引擎使用案例
1.使用定时框架Quartz.Net创建索引库,引用类库文件有Common.Logging.dll.Lucene.Net.dll,PanGu.dll,PanGu.HighLight.dll,PanGu ...
- TabLayout
效果图: 标题和fragment联动效果已经封装好了,非常方便 <android.support.design.widget.TabLayout android:id="@+id/ta ...
- 登录Cloudera Manager时报错org.hibernate.exception.GenericJDBCException: Could not open connection
去Cloudera Server上边看了一下日志: cat /opt/cloudera-manager/log/cloudera-scm-server/cloudera-scm-server.log ...
- XmlBeanFactory的Bean注册
Spring将bean从配置文件到加载到内存中的全过程: BeanFactory bf = new XmlBeanFactory(new ClassPathResource("beanFac ...
- Ajax跨域通信方法
1.Jsonp.document.domain+iframe.window.name.window.postMessage.服务器上设置代理页面. 2.Jsonp(json with padding) ...
- 餐厅到店点餐系统app燃尽图
队友: 郭志豪:http://www.cnblogs.com/gzh13692021053/ 杨子健:http://www.cnblogs.com/yzj666/ 刘森松:http://www.cnb ...
- Redis Key 命令
Redis Key 命令 del key1 key2 - keyn 删除键为key1,key2-keyn,空格分隔. persist key 移除给定 key 的生存时间,将这个 key ...
- HDU3729 I'm Telling the Truth(字典序最大的最大流)
题目大概说n个学生,都各自有一个互不相同的成绩排名,他们各自说了他们成绩排名所在区间,问最多有几个学生没说谎以及字典序最大的没说谎的学生序列. 学生作为一个X部的点,排名作为Y部的点,学生与其成绩排名 ...
- BZOJ3796 : Mushroom追妹纸
将S1与S2用#号拼接在一起形成S串 将S3与S串跑KMP求出S3在S串中每次出现的位置l[i] 对于S串每个后缀i,求出f[i]表示该串不包含S3串的最长前缀 然后求出S串的后缀数组 先从小到大扫描 ...