0
Reply

Catching mouse events on usercontrols' components

Asaf

Asaf

Sep 5 2005 6:44 AM
1.5k
Hi all, I have a problem: I created a control (inherited it from usercontrol) called ThumbnailItem, containing a small picturebox and a label for its name. I then created another control (ThumbnailViewer) and I add thumbnail items to it on runtime (It's actually a replacement for a listview with thumbnails). It all works fine so far. Now I want to identify mouse events (and specifically mouse down) on the items. I've overridden OnMouseDown on the viewer, but the event wasn't caught when the mouse was on one of the items, only between them. Then I tried overriding OnMouseDown in the Item itself, but it wouldn't recognize it at all. Any ideas anyone? Thanks a lot! Asaf