Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2004

Tip: Looking for answers? Try searching our database.

Painting a custom BG on TextBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Jones - 01 Oct 2004 09:25 GMT
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)
Alex Kazovic - 01 Oct 2004 14:40 GMT
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

> I'm inherting from the winform [TextBox] control.  I'm wanting to override
> the OnPaintBackground paint a custom background, however these method are
[quoted text clipped - 9 lines]
> Phil
> (Auckland | Aotearoa)
Sijin Joseph - 01 Oct 2004 18:25 GMT
Seems like that is a recognized problem
http://www.windowsforms.net/Forums/ShowPost.aspx?tabIndex=1&tabId=41&PostID=17588
http://www.windowsforms.net/Forums/ShowPost.aspx?tabIndex=1&tabId=41&PostID=2246

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

> I'm inherting from the winform [TextBox] control.  I'm wanting to override
> the OnPaintBackground paint a custom background, however these method are
[quoted text clipped - 9 lines]
> Phil
> (Auckland | Aotearoa)
Phil Jones - 01 Oct 2004 23:50 GMT
Rat!  Don't suppose anyone know of any textbox control's that are 100%
managed code per chance?

Many thanks people!

Signature

===
Phil
(Auckland | Aotearoa)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.