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

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

问题描述

我正在使用DateChooser,并且希望在用户每天滚动时在工具提示中显示不同的信息。是否有一个事件,因为我在日历周围滚动,这将告诉我,我现在结束了什么一天?

解决方案

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

  mx_internal var dataGrid:CalenderLayout; 

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

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

给你关于鼠标结束的日子的必要信息。您需要扩展DateChooser以使用扩展的CalendarLayout来公开selectedCell。



也许:

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

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


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?

解决方案

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 has the mouseMoveHandler. In the handler we have:

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

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.

perhaps:

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

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天全站免登陆