MouseEnter and MouseLeave events from a Panel and its child controls

后端 未结 9 821
我在风中等你
我在风中等你 2020-12-10 13:14

I have a Panel that contains child controls.

If I handle the Panel\'s MouseEnter and MouseLeave events, and its c

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 13:41

    This is a tricky one, and will be difficult to code reliably for. One idea is to "capture" the 3 incoming events in a list and execute your desired code once the list is complete (has the 3 desired events in the list). Then when you're done executing whatever code (or perhaps capture the combo of events in reverse), you could empty your list and have it ready for the next time that particular combo-event happens. Not ideal, but just a thought.

    Of course, that doesn't overcome the potential resolution issues & possible missed events Hans raised. Perhaps more context is in order.

提交回复
热议问题