code for bold,italic and underline in c# when button is pressed.....

Recommended Answers

All 3 Replies

All those are properties of a Font object. Depending on what you want to change tells you how to get the Font object to change. What is it you want to bold, italic and/or underline?

code for bold,italic and underline in c# when button is pressed.....

private void button1_click(object sender,eventargs e)
{
textbox1.font=new font(this.font,fontstyle.underline);
}

same for line and bolditalic....

private void button1_click(object sender,eventargs e)
{
textbox1.font=new font(this.font,fontstyle.underline);
}

same for line and bolditalic....

thank you it is working.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.