cmdolcet
asked on
Bolding a textbox
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
ASKER
jp, I get an overload resolution fail because no NEW can be called without an narrowing conversion
How did you used ?
ASKER
just like this:
readingLabel.Font = New Font(readingLabel.Font, FontStyle.Bold)
readingLabel.Font = New Font(readingLabel.Font, FontStyle.Bold)
Just to be clear, is that particular line the one throwing the error?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
TextBox thisBox = new TextBox();
thisBox.Style.Add("Font-Bo ld", "True");
thisBox.Style.Add("Font-Bo
readingLabel.Font = New Font(readingLabel.Font, FontStyle.Bold)