|
-
Apr 27th, 2005, 03:54 PM
#1
Thread Starter
Frenzied Member
OnPaint not firing
I've created an inherited textbox control...i've overriden the OnPaint method. Ive put a break there and it never gets hit. what could the problem be?
exactly when does the Paint event happen?
Last edited by Andy; Jun 28th, 2005 at 08:52 AM.
-
Apr 27th, 2005, 04:02 PM
#2
Re: OnPaint not firing
call this in the constructor (new method)
setstyle(ControlStyles.UserPaint)
although sometimes it can have undesirable results as it requires you to paint everything..
-
Apr 27th, 2005, 06:51 PM
#3
Thread Starter
Frenzied Member
Re: OnPaint not firing
cool. i'll give that a shot. What kind of side effects are you talking about?
-
Apr 28th, 2005, 07:16 AM
#4
Thread Starter
Frenzied Member
Re: OnPaint not firing
worked like a charm! thanks a bunch
-
Apr 28th, 2005, 08:41 AM
#5
Re: OnPaint not firing
 Originally Posted by Andy
cool. i'll give that a shot. What kind of side effects are you talking about?
not sure if any in the textbox, but in another thread the other day we were messing around with it with a listview to try to gradient the background, and when using it, it forces you to have to write all the code to draw the listview items as well as the background... it basically puts all painting in your hands.
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
|