Painting a custom BG on TextBox

P

Phil Jones

I'm inherting from the winform [TextBox] control. I'm wanting to override
the OnPaintBackground paint a custom background, however these method are
not being called.

Is the TextBox doing something funny in it's implementation or am I missing
something here? What would be the correct way to go abount painting a
custom background on the TextBox?

Many thanks!

===
Phil
(Auckland | Aotearoa)
 
A

Alex Kazovic

Phil

I have a similar problem with listboxes. The only way to have any effect is
to set ControlStyles to
UserPaint. That has an effect but doesn't work. I believe certain controls
(such as textbox and list box) paint their backgrounds differently from
other controls.

Alex
 
P

Phil Jones

Rat! Don't suppose anyone know of any textbox control's that are 100%
managed code per chance?

Many thanks people!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top