473,508 Members | 2,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatting multiselected fonts in RichTextBox (.Net 2005)

Hello All.

I'm using the RichTextBox control to show text to user that can do the
primary font formatting: fontname, size, color, bold, italic and underline.

Unlike the RichTextBox used in VB 6, this control in .NET do not apply the
expected formatting when there are multiple selection of different font
formats.

For example, if I select a text that have portions in Bold and other portion
in higher Size, on apply a simple Italic style, every character in the
session will have the same format as the applyed font, losing the Bold, the
Size, etc., and leaving every character only as Italic.

I found lots of articles saying about that issue, and the solution I found
is apply the formatting character by character, until the end of selection.

That is too bad, because I tried that on not-so-large text and takes too
long to complete the formatting. In a long text, that can take forever.
:^P

Any of you guys already discovered any real good code to correctly apply the
formats?

Cesar

May 17 '06 #1
0 1237

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1697
by: Hariharan S | last post by:
Hi Guys, I have a string, say "Hello World" and would like to format the way I want to (say, wanna have the Hello to be bold italic and the World to be of font size 14 or so) and put it in the...
2
17269
by: Hariharan S | last post by:
Hi Guys, I have a string, say "Hello World" and would like to format the way I want to (say, wanna have the Hello to be bold italic and the World to be of font size 14 or so) and put it in the...
5
553
by: Jeti [work] | last post by:
I have RichTextBox on my form... When I press the 'OK' button, form must save contents of the RichTextBox on the disk... It wouldnt be a problem usually, but it is because i need to save it as...
0
1028
by: Barguast | last post by:
I've just started messing around with the new .NET 2.0 RichTextBox control and I've got a question. How would I, for example, underline the selected block of text bearing in mind that the selection...
2
1741
by: Alvo von Cossel I | last post by:
hi, i have a richtextbox in my app. when a button is disabled, the richtextbox control should say "The button is now disabled". only the word disabled should be emboldened. how do i make only...
2
3695
by: Mystique | last post by:
Hello Is there any way to format text with tags (something like html tags) in a RichTextBox? Something similar to this: string aStr; aStr = "<b>this is bold</bthis is normal"; ...
1
3105
by: Tor Inge Rislaa | last post by:
Finding Bold Text (or other formatting attributes) in RichTextbox . Is it possible to find and select bold text by code within the text of a RichTextbox? What I want is to manipulate the text...
1
1411
by: plonk | last post by:
Hi I'm having a small problem with a vb.net application (Visual Studio 2005) I'm trying to insert the contents of a Richtextbox.text into the body of an email. It all works fine, except when I...
2
3526
by: =?Utf-8?B?TWFyayBDb2xsYXJk?= | last post by:
I'm currently writing an application that has a RichTextBox and a toolbar which includes the following toolbar buttons: - Font - Font Size - Bold - Italic - Underline I want the toolbox...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.