Solved

Bolding a textbox

Posted on 2009-05-06
7
277 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
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

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

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now