By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,672 Members | 1,303 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,672 IT Pros & Developers. It's quick & easy.

regd font

P: n/a
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.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>Hi
In a rich text box ,

I select a text and make it Bold it turns bold and i make it italic thebold 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 theselected 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 thecontrol the selection(the backcolor sorrounding the text being black ) isalso 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
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.