T
Tony
Hi,
I have a custom user control that needs to be notified every time the
BackColor of its parent is altered. Using OnBackColorChanged within my
custom control only seems to work if my control's BackColor has not been set
to anything. I suspect being an ambient property derived from its parent, it
will be notified as long as it's still getting its property value from the
parent, that is, until you explicitly set the BackColor to some value other
than Color.Empty.
Other than attaching to the Parent.BackColorChanged event chain, is there
any other way of being notified of a BackColor change within the parent
control?
Reason is that I'm painting my custom control in combination with the
parent's BackColor property and I need to invalidate my control anytime the
parent control gets repainted.
Thanks in advance,
Tony.
I have a custom user control that needs to be notified every time the
BackColor of its parent is altered. Using OnBackColorChanged within my
custom control only seems to work if my control's BackColor has not been set
to anything. I suspect being an ambient property derived from its parent, it
will be notified as long as it's still getting its property value from the
parent, that is, until you explicitly set the BackColor to some value other
than Color.Empty.
Other than attaching to the Parent.BackColorChanged event chain, is there
any other way of being notified of a BackColor change within the parent
control?
Reason is that I'm painting my custom control in combination with the
parent's BackColor property and I need to invalidate my control anytime the
parent control gets repainted.
Thanks in advance,
Tony.