Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
3.13/5 (4 votes)
See more:
I want to write a code for a bold the one line in text box
Posted
Comments
Pheonyx 27-Feb-14 4:09am    
That's good, feel free no one is going to stop you.
If you want some assistance, I suggest you use the "Improve question" to give more details of what you are trying to do as we are not psychic. Also give snippets of code to demonstrate what you have tried and where exactly you are stuck.
OriginalGriff 27-Feb-14 4:14am    
"That's good, feel free no one is going to stop you."
Well, Microsoft are...TextBoxes don't do that... :laugh:

You can't - text boxes do not support different font or text style for individual lines: any text embellishment applies to the whole text box.

You could use a RichTextBox though - that supports font and bold (etc.) on a character by character basis if necessary.

[edit]Typo: "Test" for "Text" - OriginalGriff[/edit]
 
Share this answer
 
v2
As far as I know you cannot change a single lines font in a TextBox.
You would need to use a RichTextBox
eg.
Font f = new Font("Verdana",14,FontStyle.Bold);
richTextBox1.SelectionFont = f;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900