richtextbox

Append rich formatted text from 2 RichTextboxes into another RichTextBox in C#

喜欢而已 提交于 2020-07-22 10:30:05
问题 I have 3 RichTextBoxes: richTextBox1, richTextBox2 and richTextBox3. I run the app and enter text into textbox 1 and 2. So the text for richTextBox1 is "Test" and for richTextBox2 is "ing". I now want to append that text together and put it into another richTextBox (preserving any formatting like bold, underlining, etc...) So I try the following code: richTextBox3.Rtf = richTextBox1.Rtf + richTextBox2.Rtf; This doesn't cause any error but I only get the text from richTextBox1. So I get "Test"

Comparing words in two richtextbox to find difference?

怎甘沉沦 提交于 2020-06-23 04:37:22
问题 I have three RichTextBoxes . I want to compare all the words of RichTextbox1 with Richtextbox2 one by one with space or comma as the delimiter. If they are same do nothing, if not highlight the text to some color and save it in RichTextBox3 . I am having some trouble with the loop. 回答1: Explanation First we will declare some variables to shorten our writing work. We'll then use the For Each command. Here we will take two rounds to scan the differences, first of Richtextbox1 which is not in

Comparing words in two richtextbox to find difference?

匆匆过客 提交于 2020-06-23 04:37:06
问题 I have three RichTextBoxes . I want to compare all the words of RichTextbox1 with Richtextbox2 one by one with space or comma as the delimiter. If they are same do nothing, if not highlight the text to some color and save it in RichTextBox3 . I am having some trouble with the loop. 回答1: Explanation First we will declare some variables to shorten our writing work. We'll then use the For Each command. Here we will take two rounds to scan the differences, first of Richtextbox1 which is not in

Export a .NET WinForms Form to PDF?

佐手、 提交于 2020-06-08 15:15:12
问题 I have a .NET WinForms containing a few user controls. these controls usually contain either a RichTextBox or similar text controls (also 3rd party grid, XtraGrid suite, but those have the feature i want). I want to export the form the same way it looks to a PDF document. I've seen several libraries and general PDF creation features but im completely confused as to what i need exactly. If anyone has any suggestions how to do the scenario I'm talking about, I'd appreciate the help and personal

Selected Text Formatting in WPF RichTexBox

a 夏天 提交于 2020-04-18 01:06:11
问题 I am trying to implement programmatically selected (using regex) text formatting in a WPF RichTextBox. The use case is simply a WPF RichTextBox in which the user types text. However, to improve or accelerate readability i want to incorporate some automatic formatting as the text is typed. The following code from How to select text from the RichTextBox and then color it? is exactly what i am trying to do. However, as far as i can tell this code is for a WinForms RichTextBox: public void