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?
Printable View
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?
call this in the constructor (new method)
setstyle(ControlStyles.UserPaint)
although sometimes it can have undesirable results as it requires you to paint everything..
cool. i'll give that a shot. What kind of side effects are you talking about?
worked like a charm! thanks a bunch :D
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.Quote:
Originally Posted by Andy