I have a panel on a form that is placed under a control. I am going to use that panel to draw a gradient from black to transparent to simulate a shadow being cast from the control. However, there will be other controls underneath the panel, and the panel will catch clicks that are meant for the panels beneath it.
How can I get clicks to "fall through" the panel and go to the panel beneath it? I would prefer not to override the entire message proc. I am also open to other suggestions on how to do shadows.
Unfortunately the clicks don't fall through like that (i.e. if you set up a click handler on the form and put a button on it, when you click the button only the button click handler gets triggered). What you can do is to cascade click events like this:
topPanel_OnClick() { bottomPanel_OnClick(topPanel, EventArgs.Empty); }
Obviously adds noise but it is way better than having a 'falling' behavior for clicks which would trigger a series of events.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With