Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

RichTextBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sanjay - 05 Apr 2005 13:15 GMT
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
Richard Parsons - 05 Apr 2005 16:55 GMT
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
Sanjay - 06 Apr 2005 06:17 GMT
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

> 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
[quoted text clipped - 6 lines]
> -Richard
> richard.parsons.junk@gmail.com
Richard Parsons - 06 Apr 2005 14:30 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.