Mouse Events in Nested Controls


C

Cole Shelton

Hi all,

I am wondering what the "normal" behavior for mouse events(click,down,
etc..) within nested controls is. Do the mouse events fire for the
container control and the child control if you click on the child control?
Or only the child control? or only the parent control?

The reason I am asking is because I have a Panel which has many child Panels
within it. When I hook up a mouse event (mousedown,click) to the parent, it
does not fire when I click on the child control. I was hoping it would fire
so I could use GetChildAtPoint to access the child control. The event DID
fire when I clicked on part of the panel without a child control.

I then opted to hook up the mousedown event inside my child control and
simply have it act upon the parent control to do the work. Unfortunately,
the event does not fire here either!?

Am I missing something? Is there a property that must be set correctly to
make this work?

Thx in advance,
Cole
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top