Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple question: how do I change text to bold

Status
Not open for further replies.

RebLazer

Programmer
Jun 7, 2002
438
US
I see such complicated examples - I don't think I should need to instantiate new objects for this: how do I simply turn label1's text to bold - i.e. without effecting anything else about its font characteristics?

Thanks,
Lazer
 
try this:

Code:
Label1.Font = New Font(Label1.Font, FontStyle.Bold)

To turn it back to regular:

Code:
Label1.Font = New Font(Label1.Font, FontStyle.Regular)

-Stephen Paszt
 
Paszt - thanks that's exactly what I was looking for.

Lazer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top