I created a user control inheriting from UserControl
class. My user control has only one constituent control -
a button in it. I tried to alter the appearence of the
button. I wrote a new method which handles the contituent
control's Paint event. When I run this code, I am unable
to see the changes to the button's appearence clearly.
However when I use the same code with a control that I
inherited from System.windows.forms.button, by overriding
the OnPaint method, it works.
Can someone explain?
Also,I want to know, if it is possible to change the
appearence of a constituent control by overriding the
OnPaint method. It does not give me any errors when I try
that. But the books say, that it cannot be done and that a
new method must be written to handle the constituent
control's paint method.
Thanks
|