473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How do I maintain RichTextBox Fonts when manipulating the text?

Hi,

I have a rich text box named MyRichTB which has different types of fonts in it. I want to manipulate the text but maintain the fonts. for example:

Expand|Select|Wrap|Line Numbers
  1. int PromptLocation = ... ;
  2. string cmd = " ... ";
  3. MyRichTB.Text = MyRichTB.Text.Remove(PromptLocation);
  4. MyRichTB.AppendText(cmd);
  5.  
it seems that both commands Remove() and AppendText() change all the fonts to default.

how can I maintain the original fonts?
Oct 13 '10 #1
1 1036
if this is of interest to anyone, i found a sollution:
to use the methods Copy, Paste with the desired text selected.
Oct 13 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: pablo | last post by:
Dear NG'ers, I want to keep my images at a certain position that should change when the text is enlarged or shrunk with the button on the toolbar? What event is triggered when resizing text in...
0
by: LaidBack Bill | last post by:
My application allows the user to select fonts. I fill in a combo box control with the available fonts by looping through all System.Fonts: ' Get all the screen fonts ReDim...
1
by: Michael Tanner | last post by:
I have a multiline text box. I would like some of the text to be one font color and other text another font color. Is this possible with a multiline text box?
1
by: Steve Pan | last post by:
Hi all, When the text of textbox web server control is changed automatically (not entered), the TextChanged event is not triggered. Who can tell in this case which event will be triggered? ...
7
by: toby989 | last post by:
Hi All Sorry for reposting...the entries of the post from 11/23/2005 by Eric Lindsay have been removed from the server already and I am seeing only the header. So, I have the problem of...
6
by: tomasio | last post by:
Dear NG, years have passed and I am still more designer than programmer. I build a new version of my website which has a few nasty bugs, especially on my startpage: Resizing text brakes the...
1
by: EricBlair | last post by:
Hello, Wondering if someone might help on this... I write out formatted text to a file then load it into a RichTextBox. However the text that is formatted into a table displays like this...
0
Krishna Ladwa
by: Krishna Ladwa | last post by:
In Sql Server 2000 Version, I found that no Notification message box appears when converting text column to varchar but the data gets truncated to the given size for the varchar. Whereas it appears...
3
by: ogo796 | last post by:
hi there! i have a problem manipulating a text file using php. I want to write information posted from an html form. from the example below i want to upload the file and it must be under the specific...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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
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,...

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.