个别日期的 Flex DateChooser 事件? [英] Flex DateChooser events for individual days?

查看:21
本文介绍了个别日期的 Flex DateChooser 事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 DateChooser,并希望在用户每天滚动时在工具提示中显示不同的信息.当我在日历上滚动时,是否有一个事件会告诉我我目前结束的日期是哪一天?

I'm using a DateChooser, and want to show different information in a tooltip as the user rolls over each day. Is there an event that fires as I'm rolling around the calendar that will tell me what day I'm currently over?

推荐答案

有点复杂.您将需要使用 mx_internal 命名空间.DateChooser 组件的网格部分是 DateChooser.as 中的 CalenderLayout 组件.

It's a little complicated. You're going to need to use the mx_internal namespace. The grid portion of the DateChooser component is a CalenderLayout component in DateChooser.as.

mx_internal var dataGrid:CalenderLayout;

CalenderLayout.as 有 mouseMoveHandler.在处理程序中,我们有:

CalenderLayout.as has the mouseMoveHandler. In the handler we have:

var selCell:IUITextField = dayBlocksArray[colIndex][rowIndex];

这会为您提供有关鼠标停留在哪一天的必要信息.您需要扩展 DateChooser 以使用扩展的 CalendarLayout 来公开 selectedCell.

that gives you the necessary info about which day the mouse is over. You will need to extend DateChooser to use an extended CalendarLayout that exposes the selectedCell.

也许:

private function mouseMoveHandler(event:MouseEvent):void
{
    ...
    dispatchEvent(new DayHoverEvent(selCell.text));
}

我想我想说的是它有点棘手,而且它使用 mx_internal,这意味着变量在 Flex 的更高版本中可能会发生变化.

I guess what I'm trying to say is it's kinda tricky, and it uses mx_internal, which means the variables are subject to change in later versions of Flex.

这篇关于个别日期的 Flex DateChooser 事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆