Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2006

Tip: Looking for answers? Try searching our database.

Passing mouse events up to a control's container

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JezB - 10 Feb 2006 11:56 GMT
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?
Charles Law - 10 Feb 2006 13:50 GMT
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

>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?
Stoitcho Goutsev (100) - 10 Feb 2006 14:27 GMT
Charles, In windows forms there is no event bubbling. You need to catch
mouse events one each control that the contianer contains.

Signature

Stoitcho Goutsev (100)

> 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.
[quoted text clipped - 7 lines]
>>control, MouseMove is no longer fired in the container. How can I force
>>this?
Charles Law - 10 Feb 2006 19:02 GMT
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

> Charles, In windows forms there is no event bubbling. You need to catch
> mouse events one each control that the contianer contains.
[quoted text clipped - 10 lines]
>>>that control, MouseMove is no longer fired in the container. How can I
>>>force this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.