【发布时间】:2014-05-12 07:50:55
【问题描述】:
我想只允许在我的 DateSpinner 上选择月份和年份。这在 Flex SDK 4.7 中可行吗? 谢谢
【问题讨论】:
标签: actionscript-3 apache-flex mobile flex4.5 flex4.7
我想只允许在我的 DateSpinner 上选择月份和年份。这在 Flex SDK 4.7 中可行吗? 谢谢
【问题讨论】:
标签: actionscript-3 apache-flex mobile flex4.5 flex4.7
这不是您可以启用/禁用的设置。
一种方法是将 SpinnerList 与您想要的年份值一起使用。
但您也可以扩展 DateSpinner 并隐藏您不想看到的组件。 如果您查看 DateSpinner 源代码,您会看到三个属性:
/**
* The SpinnerList that shows the year field of the date.
*/
protected var yearList:SpinnerList;
/**
* The SpinnerList that shows the month field of the date.
*/
protected var monthList:SpinnerList;
/**
* The SpinnerList that shows the date field of the date.
*/
protected var dateList:SpinnerList;
微调器初始化后,您可以将其可见性和 includeinlayout 设置为 false。
【讨论】: