Mouseout/Mouseover/rolout/rolover event comparison

Source: Internet
Author: User

Recently, a flex propertygrid is to be created. The attribute display method does not use the traditional propertygird display method, but the main user behavior must be consistent with the traditional propertygrid.

Propertygrid is divided into two states: "floating" and "embedded ". When the status is suspended and the mouse moves to the property mini tab, The propertygrid main form is displayed to hide the mini tab. When the mouse moves out of the propertygrid main form, the window is closed and the Mini tab is displayed.

It is a habit to select a mouseout event, that is, to register a mouseout event for propertygird. When the mouse moves out, the propertygrid is disabled. However, tests show that when this event is used, the window is closed even if the mouse is not removed from the propertygrid. Finally, you have to writeProgramTest results show that if the propertygrid contains other controls, moving the mouse over these controls triggers the mouseout and Mouseover events, resulting in a previous logic error.

If rolout and rolover events are used, no logical problems will occur.

The difference is that the rolover and rolout events are triggered only when the mouse moves to and from the component listening to the event, but not when the mouse moves to and from its child components. The Mouseover and mouseout events are triggered when the mouse moves to and from the components listening for this event and the child components.

TestCodeSee Flash View Source.

For test results, see flash. Move the cursor over the Panel, and the DataGrid displays the event information.

Flash link: http://files.cnblogs.com/jingtao/OnMouseOutTest.rar

 

OriginalArticle, Reprinted, please indicate the source!
All copyright reserved!

Home: http://jingtao.cnblogs.com

QQ: 307073463
Email: jingtaodeemail@qq.com
MSN: sunjingtao@live.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.