|
-
October 22nd, 2002, 09:47 PM
#1
OnPaint method for System.Windows.Forms.TextBox
Hello,
I have created a custom TextBox control by inheriting from System.Windows.Forms.TextBox and I'm changing a bunch of display properties by Overriding the OnPaint method for the derived control.
But the OnPaint method is not getting called when the derived control is placed on the Form, and the form is displayed at runtime. This is working for other controls like Label, CheckBox etc.
My question is, when does the Paint event, raised for the TextBox control? Also if overriding the OnPaint method will not work for the Text Box control then what is the alternate method I can use. I want to change the display properties of the derived TextBox control only when it gets displayed.
I'm changing the following properties : BackColor, ForeColor and Font
Thanks,
Ani
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|