Greetings Everyone.
I have been trying to fill a panel control with linear gradient. (Isn't
everyone?) This control contains a number of label controls. I placed code
in the panel's paint event handler. While this does fill my panel as
expected it also performs the fill on each of the label controls resulting
in a rather tacky display of gradient excess.
I have confirmed that, to no surprise, the paint routine is being called
once for the panel and again for each constituent control. It also appears
as though the panel itself is the sender of all the events and each of the
labels' dimensions are being sent in the ClipRectangle property. I am not
sure I understand the reasoning behind this. Can someone explain that? More
importantly, would someone mind sharing their clever solution to getting
only the panel to paint? (I've considered comparing label locations to
ClipRectangle X and Y but that seems clumsy.)
TIA -
Eric