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 Controls / September 2005

Tip: Looking for answers? Try searching our database.

Changing Checkbox 'box' colour from white.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
el_sid - 23 Sep 2005 16:15 GMT
Is there a simple way to change the colour of the checkbox's background
colour from the default white to another colour for the actual box (not the
label which you can do at design time).
Dhana - 26 Sep 2005 05:53 GMT
Hi,

Did you try Flatstyle property in your check box?  I think below code will
help full to you.

this.checkBox1.BackColor = System.Drawing.SystemColors.AppWorkspace;

this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;

Dhana

> Is there a simple way to change the colour of the checkbox's background
> colour from the default white to another colour for the actual box (not
> the
> label which you can do at design time).
Herfried K. Wagner [MVP] - 26 Sep 2005 12:12 GMT
"el_sid" <el_sid@newsgroup.nospam> schrieb:
> Is there a simple way to change the colour of the checkbox's background
> colour from the default white to another colour for the actual box (not
> the
> label which you can do at design time).

You will have to draw the control yourself (for example, by deriving a
class from 'CheckBox' and overriding its 'OnPaint' method.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

el_sid - 29 Sep 2005 10:47 GMT
Thanks, we will probably give this a try when we get a chance.

> "el_sid" <el_sid@newsgroup.nospam> schrieb:
> > Is there a simple way to change the colour of the checkbox's background
[quoted text clipped - 4 lines]
> You will have to draw the control yourself (for example, by deriving a
> class from 'CheckBox' and overriding its 'OnPaint' method.

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.