【问题标题】:In flex, how to trigger mouseevent when the focus is on TextInput?在flex中,当焦点在TextInput上时如何触发mouseevent?
【发布时间】:2011-03-22 23:29:27
【问题描述】:

在 flex 中,我使用以下内容:

mx:TextInput mouseOver="tester(event)"

它工作正常。我的指针越过 textInput 并调用该函数。但是当我在 textInput 内部单击以输入一些文本(焦点在 textInput 上)然后移动鼠标(不将鼠标指针移到 textinput 的边界之外)时,不会触发 mouseover 事件。

如果我使用点击事件,那么即使我正在输入文本(或焦点在文本输入上)然后点击,它也会调用该函数。

当焦点位于 textInput 时,如何在鼠标悬停时调用 tester 函数?

【问题讨论】:

    标签: apache-flex mouseevent textinput


    【解决方案1】:

    当鼠标移到控件上时触发 mouseOver 事件。

    也许您想尝试每次鼠标移动时都会触发的mouseMove 事件?

    请记住,mouseEvents 和 focusEvents 本质上并不相关。我希望当鼠标滚过你的 textInput 时会触发 mouseOver 事件,无论该 textInput 是否具有焦点。

    【讨论】:

      猜你喜欢
      • 2011-02-11
      • 1970-01-01
      • 2021-02-13
      • 2016-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-19
      相关资源
      最近更新 更多