hi,

In VB6 we usedt to have property called selBold,selItalic etc on
RichTextBox.In .NET , we no longer have such properties . Setting SelBold
etc to true/false did all our work.

How can we achieve such in .NET.Main problems occur we want to format text
of mixed fontStyles.
for example,Some part of selection are Bold , then Italic then
Underlined+Italic and nowI want to bold them all.
Obviously , there is no single step to achieve this in .net.
So,Do I am required to traverse each character of the selection and change
their fontStyle ? that will consume a lot of time..

please give me some insight on the same.

I will be thankful if anybody please provides me with some information on
how to achieve the same.

sanjay singh

Re: RichTextBox by Richard

Richard
Tue Apr 05 10:55:10 CDT 2005

You can now use RichTextBox.Font.Bold = true. I have an entire control
already built that can show you how to do these things simply. Plus if you
want you can use the control free in any of your apps.

http://www.codeproject.com/cs/miscctrl/RichTextBoxExtended.asp

Enjoy
Let me know if this helps any,
-Richard
richard.parsons.junk@gmail.com

--
Message posted via http://www.dotnetmonster.com

Re: RichTextBox by Sanjay

Sanjay
Wed Apr 06 00:17:38 CDT 2005

hi Richard,

It does not work as any full-fledged RichTextBox will.
And sunce I have upgraded my project from VB6 to VB.net , I want to provide
all the features I used to provide in VB6.
Your RichTextBox does not work for mixed Selection..I am taking an example..

In my selection I have two words "Sanjay" and "Singh".
"Sanjay" is BOLD , "Singh" is BOLD as well as ITALIC.
Now I select all and press "I" to make them all italic.
It does make them but their boldness are not preserved making then normal.
It was not so in VB6 , When we said RichTextBox1.SetBold = true, Selection
was made bold preserving their previous fontStyle.

So obviously it does not serve my purpose.
I want to achieve the same.
Plz provide me with some help

sanjay


"Richard Parsons via DotNetMonster.com" <forum@DotNetMonster.com> wrote in
message news:b0cbd6ed57544434929d60d66e29af70@DotNetMonster.com...
> You can now use RichTextBox.Font.Bold = true. I have an entire control
> already built that can show you how to do these things simply. Plus if
you
> want you can use the control free in any of your apps.
>
> http://www.codeproject.com/cs/miscctrl/RichTextBoxExtended.asp
>
> Enjoy
> Let me know if this helps any,
> -Richard
> richard.parsons.junk@gmail.com
>
> --
> Message posted via http://www.dotnetmonster.com



Re: RichTextBox by Richard

Richard
Wed Apr 06 08:30:28 CDT 2005

The only work around for this that I can think of right now is to take the
selected string and get the start char and lenght then select manually
select each individual character and bold it.

I know that isn't the best solution but I think it will work. Sorry I
can't be of any more help.

-Richard

--
Message posted via http://www.dotnetmonster.com