PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Passing mouse events up to a control's container
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Passing mouse events up to a control's container
![]() |
Passing mouse events up to a control's container |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I want to handle events in a container (eg. MouseMove in a Panel). Problem
is: when the panel contains Controls and the mouse moves over that control, MouseMove is no longer fired in the container. How can I force this? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
In the container, handle the mouse events you want to bubble, and raise
[your own] container events to repeat them up to the container's parent. HTH Charles "JezB" <jezbroadsword@blueyonder.co.uk> wrote in message news:%23WrunjjLGHA.3960@TK2MSFTNGP09.phx.gbl... >I want to handle events in a container (eg. MouseMove in a Panel). Problem >is: when the panel contains Controls and the mouse moves over that control, >MouseMove is no longer fired in the container. How can I force this? > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Charles, In windows forms there is no event bubbling. You need to catch
mouse events one each control that the contianer contains. -- Stoitcho Goutsev (100) "Charles Law" <blank@nowhere.com> wrote in message news:OoUqwjkLGHA.2124@TK2MSFTNGP14.phx.gbl... > In the container, handle the mouse events you want to bubble, and raise > [your own] container events to repeat them up to the container's parent. > > HTH > > Charles > > > "JezB" <jezbroadsword@blueyonder.co.uk> wrote in message > news:%23WrunjjLGHA.3960@TK2MSFTNGP09.phx.gbl... >>I want to handle events in a container (eg. MouseMove in a Panel). Problem >>is: when the panel contains Controls and the mouse moves over that >>control, MouseMove is no longer fired in the container. How can I force >>this? >> > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
I used the word 'bubbling' because that is the effect that is being sought,
not because there is an intrinsic ability to bubble events. The solution is still the same though: in each container, handle the desired events of the child control and raise user-defined events in the container to be caught by the parent. Charles "Stoitcho Goutsev (100)" <100@100.com> wrote in message news:ub2Et2kLGHA.3100@tk2msftngp13.phx.gbl... > Charles, In windows forms there is no event bubbling. You need to catch > mouse events one each control that the contianer contains. > > > -- > > Stoitcho Goutsev (100) > > "Charles Law" <blank@nowhere.com> wrote in message > news:OoUqwjkLGHA.2124@TK2MSFTNGP14.phx.gbl... >> In the container, handle the mouse events you want to bubble, and raise >> [your own] container events to repeat them up to the container's parent. >> >> HTH >> >> Charles >> >> >> "JezB" <jezbroadsword@blueyonder.co.uk> wrote in message >> news:%23WrunjjLGHA.3960@TK2MSFTNGP09.phx.gbl... >>>I want to handle events in a container (eg. MouseMove in a Panel). >>>Problem is: when the panel contains Controls and the mouse moves over >>>that control, MouseMove is no longer fired in the container. How can I >>>force this? >>> >> >> > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

