加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex之日历控件设置

发布时间:2020-12-15 01:06:10 所属栏目:百科 来源:网络整理
导读:Flex在平时的使用的过程中,我们会用到DateChooser控件,这个控件最早是使用E文的,为了能显示出中文,以及设置一些样式, 我这里设置了DateChooser。不用多说,帖上代码: mx:DateChooser x="139" y="83" borderColor="green"change="datechooser1_changeHa

Flex在平时的使用的过程中,我们会用到DateChooser控件,这个控件最早是使用E文的,为了能显示出中文,以及设置一些样式,

我这里设置了DateChooser。不用多说,帖上代码:

<mx:DateChooser x="139" y="83" borderColor="green"
									change="datechooser1_changeHandler(event)"
									click="datechooser1_clickHandler(event)"
									dayNames="[日,一,二,三,四,五,六]"
									headerColors="{[0xE1E56B,0x04F5F7 ]}"
									headerStyleName="myHeaderStyle"
									monthNames="[一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月]"
									scroll="changeMonth(event)"
									selectedRanges="{{rangeStart:new Date(2011,7,12),rangeEnd:new Date(2007,10,10)}}"
									todayColor="#CCCCCC"	todayStyleName="myTodayStyle"  weekDayStyleName="myDayStyle"?yearNavigationEnabled="true"/>
而且里面用到了一些样式:

在css文件中写入

/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";


.yahei{
	font-family:"Microsoft Yahei",Georgia;
}
.myHeaderStyle{
	color:#6666CC; 
	font-family:Times New Roman,Times,serif;
	font-size:16px; font-weight:bold;
}
.myTodayStyle{
	color:#CC6633; 
	font-family:Times New Roman,serif;
	font-size:12px; font-weight:bold;
}
.myDayStyle{
	color:#006600; 
	font-family:Courier New,Courier,mono;
	font-size:15px; font-style:italic; font-weight:bold;
}

最终的显示效果如下:


(待续..................................................................................)

? 时不我待.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读