【发布时间】:2010-10-17 04:11:42
【问题描述】:
我正在使用 DateChooser,并且希望在用户每天滚动时在工具提示中显示不同的信息。当我在日历中滚动时,是否有一个事件会触发我当前结束的日期?
【问题讨论】:
标签: apache-flex components datechooser
我正在使用 DateChooser,并且希望在用户每天滚动时在工具提示中显示不同的信息。当我在日历中滚动时,是否有一个事件会触发我当前结束的日期?
【问题讨论】:
标签: apache-flex components datechooser
change 呢?
【讨论】:
这有点复杂。您将需要使用 mx_internal 命名空间。 DateChooser 组件的网格部分是 DateChooser.as 中的 CalenderLayout 组件。
mx_internal var dataGrid:CalenderLayout;
CalenderLayout.as 有 mouseMoveHandler。在我们的处理程序中:
var selCell:IUITextField = dayBlocksArray[colIndex][rowIndex];
这为您提供了有关鼠标在哪一天结束的必要信息。您需要扩展 DateChooser 以使用扩展的 CalendarLayout 来公开 selectedCell。
也许:
private function mouseMoveHandler(event:MouseEvent):void
{
...
dispatchEvent(new DayHoverEvent(selCell.text));
}
我想我想说的是它有点棘手,而且它使用 mx_internal,这意味着变量可能会在更高版本的 Flex 中发生变化。
【讨论】:
您可能想查看我的博客文章:http://flexmonkey.blogspot.com/2010/06/displaying-color-coded-events-in-flex.html
我基于 Kevin Brammer (http://www.cyberslingers.com/weblog/post/Adding-Calendar-Event-Entries-to-the-Flex-DateChooser-Component.aspx) 之前的一些工作 - 它允许您为各个日期添加工具提示并对其进行颜色编码
希望对你有帮助,
西蒙
【讨论】: