C# highlight part of form over controls

233 Views Asked by At

I am creating graphs (panels) and I want to highlight some line(area) of these panels by using MouseEnter/MouseLeave.
To be more specific, there are also another controls on form (Buttons, DGV, etc) and I have main scrollable panel for graph area. In this panel, there are panels as columns (dates) and in these columns are panels with some backcolors as lines. These lines should be highlighted on MouseEnter.
I also need to be able to click on these panels after highlighting line to run events which are on panels.
I am creating all controls programatically and have DB data source. Quite close but dirty code is crete new form with size for example (2000, 20) without borders, set opacity and backcolor.
Thanks in advance for any suggestion

1

There are 1 best solutions below

0
On

Maybe you should consider doing all this (creating graphs, etc.) via Graphics instead of Controls! In that case you would have full control over event handling, highlighting, and so on.

I do not think there is a clean way to achieve what you want by using controls only.