Image within Splitter - Bubbling Click Event

  • Thread starter Thread starter Phil Jones
  • Start date Start date
P

Phil Jones

I've got a WinForms question, that hopefully isn't too twisty!

I'm working with a [Splitter] object, and what I'm wanting to do is maintina
good control over it's visual appearance. I'm settings it's
BackgroundImage, but what I also want to do is insert an Image within it
(which is a visual representation of something to grab - like the grabber
image at the bottom-right of a form). For scaling and positional reasons I
can't have the grabber icon as part of the actual BG image.

Here's the problem: I can insert the image into the [Splitter], and position
it just fine. But when the user clicks on it, the [Splitter] won't move,
because it is the image recieving the click action, not the containing
[Splitter].

Is there some way I can bubble the click event up to the containing
[Splitter], so that it thinks it has been clicked, rather that it's child
Image control?

Thanks everyone.
===
Phil
(Auckland | Aotearoa)
 
Hi Phil,

Just as Jakob said, Winform does not use the event bubbling mechanism,
generally, we may handle the splitter.paint event and draw the grab icon
onto the splitter, so that there would be only one control. You may read
the Control.Paint event for more information:
<Control.Paint event>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwindowsformscontrolclasspainttopic.asp

If you have any questions on this issue, please feel free to reply this
thread.

Good luck!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
Thanks Ying-Shen and Jakob. That gives me a handle on what to do here.

Cheers,
===
Phil
 
Back
Top