Solved

Bolding a textbox

Posted on 2009-05-06
7
287 Views
Last Modified: 2013-11-26
I need to bold a reading inside the I use the drawing.fontstyle.Bold but it triggers and error. What am I doing wrong?
readingLabel.ForeColor = readingLabel.BackColor
readingLabel.BackColor = System.Drawing.Color.Black
readingLabel.Font = system.drawing.FontStyle.Bold

Open in new window

0
Comment
Question by:cmdolcet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24313903
Try this way:

readingLabel.Font = New Font(readingLabel.Font, FontStyle.Bold)
0
 

Author Comment

by:cmdolcet
ID: 24314244
jp, I get an overload resolution fail because no NEW can be called without an narrowing conversion
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24314283
How did you used ?
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:cmdolcet
ID: 24314309
just like this:
readingLabel.Font = New Font(readingLabel.Font, FontStyle.Bold)
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24314419
Just to be clear, is that particular line the one throwing the error?
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 125 total points
ID: 24314429
readingLabel is a textbox, right ?
Try to change it to:
readingLabel.Font = New System.Drawing.Font(readingLabel.Font, System.Drawing.FontStyle.Bold)
0
 
LVL 6

Expert Comment

by:MrJesse34
ID: 24315424
                   TextBox thisBox = new TextBox();
                    thisBox.Style.Add("Font-Bold", "True");
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question