TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ssswamii
NA
180
0
OnPaint override
Oct 7 2003 2:39 PM
I have a class that inherits from the RichTextBox control. I need to do some custom drawing on the RichTextBox, so I override the paint event and do the custom drawing: protected override void OnPaint(PaintEventArgs e) { // draw normally base.OnPaint (e); // add our custom border ControlPaint.DrawBorder(e.Graphics, e.ClipRectangle, Color.Black, ButtonBorderStyle.Solid); } Simple enough, right? Well, when I run the app, every time I enter text into the control, the custom drawing I did gets cleared. Why is that? Is there a way around this?
Reply
Answers (
8
)
Global Variables
Object.Equals vs. Convert.ReferenceEquals