Tag Archives: ListEvent

Flex: DataGrid使用ListEvent.ITEM_DOUBLE_CLICK监听双击事件

之前没怎么注意, 一直用MouseEvent.DOUBLE_CLICK来监听DataGrid的双击事件. 但这样会造成即使在空行双击也会激发响应.

datagridClasses.doubleClickEnabled = true;
datagridClasses.addEventListe

Posted in ActionScript, Flex | Tagged , , , , , | Leave a comment

[小技巧] 通过监听DataGrid的ListEvent.Change控制button是否可用.

如下, 在没有点击[默认]是, 后两个button的enable=false;

image

点击一个之后:

image

简单实现方法:

_dataGridStudent.addEventListener(ListEvent.CHANGE, onSlectedChange);

对应监听函数:

_actionEd

Posted in ActionScript, Flex | Tagged , | Leave a comment