regd font

J

Jyothi

Hi,

In a rich text box ,

I select a text and make it Bold it turns bold and i make it italic the
bold nature is lost....

I do not want this to happen..how do i avoid this?
I want the style to be both italic and bold or whatever is being done on the
selected text.i.e just exactly how the Word behaves..

When i also select text in the rich text box and move focus out of the
control the selection(the backcolor sorrounding the text being black ) is
also lost ..

How do I retain this?

Can anybody help me out?

TIA,
Jyothi.
 
H

Hector Martinez

Hi
In a rich text box ,

I select a text and make it Bold it turns bold and i make it italic the
bold nature is lost....

I do not want this to happen..how do i avoid this?
I want the style to be both italic and bold or whatever is being done on the
selected text.i.e just exactly how the Word behaves..

Try with this:

FontStyle MyFontStyle = FontStyle.Bold | FontStyle.Italic;

richTextBox1.Font = new Font(richTextBox1.Font,
MyFontStyle);

When i also select text in the rich text box and move focus out of the
control the selection(the backcolor sorrounding the text being black ) is
also lost ..

How do I retain this?


You just have to set the RichTextBox "HideSelection"
property to false; Take a look to that property....
Can anybody help me out?

I hope this help.....
TIA,
Jyothi.

Hector Martinez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top