Questions tagged [richtextbox]

The RichTextBox control allows to display or edit RTF (Rich Text Format) content, which may include formatted paragraphs, hyperlinks, and inline images.

richtextbox
Filter by
Sorted by
Tagged with
0 votes
1 answer
655 views

Format RTF text into multiple textboxes

I have a richtextbox on my wpf form that the user types into, with no restrictions on length. However, on my active reports output, I have pages with fixed-space textboxes on each page. Is there any ...
steve's user avatar
  • 223
2 votes
1 answer
1k views

DocumentViewer to RichTextBox Binding Error

I have an application with RichTextBox and DocumentViewer (placed in a TabControl), and I want to make something like "hot preview". I've binded DocumentViewer.Document property to RichTextBox....
Artur Michajluk's user avatar
2 votes
2 answers
4k views

Stretch Width of WPF RichTextBox within a TreeView

My objective is simply to have a RichTextBox consume the entire row width inside a TreeView. The XAML below will produce a TreeView with a RichTextBox element, but the width is only 1 character wide. ...
aidesigner's user avatar
7 votes
1 answer
7k views

Cursor position changed event

I'm trying to extract the font of the next character after the current position of the cursor from a RichTextBox. This needs to be done everytime the cursor is moved in the RichTextBox. I haven't ...
Glenn's user avatar
  • 489
2 votes
1 answer
16k views

Using different font color in same textbox

I want to use different color for each character in a TextBox. Eg: when user types first 10 character it should be black after that red. How can I do this please help. I am using using simple VB.NET ...
Preeti's user avatar
  • 1,386
2 votes
2 answers
6k views

How to populate Rich Text Box Line By line with txt? vb

I'm trying to populate a rich text box line by line with txt file... without result! This is the result that would like to get: House 2. Dog 3. Cat 4. Etc each one in a row below the other Any ...
Valerio's user avatar
  • 278
2 votes
2 answers
7k views

How to make custom Intellisense for a word in a richtextbox for vb.net

I was wondering if anyone knew how to create a intellisense type form for a rich text box word. Really I only need help with the code that gets the highlighted words location and places my form under ...
Mike Rebosse's user avatar
0 votes
1 answer
2k views

Extended WPF Toolkit Rich Text Box in ListBox Binding

I am trying to bind a RichTextBox in a list view to no avail. If I do not wrap the RichTextBox in the listview and only assign it to the class, it works just fine. But as soon as I try to assign to ...
nitefrog's user avatar
  • 1,800
0 votes
2 answers
938 views

Rich TextBox accepting Script tags also

I have a aspx form where we have used freetextbox as my rich text editor to make entries. but I am able to enter <script></script> in this reach tags. how can i validate on client side ...
Murtaza's user avatar
  • 3,065
0 votes
1 answer
378 views

Separate color for each line in asp:TextBox

I want to create an IDE in .NET for some programming language for that I need an input textbox where I will have space to write my code. In this textbox I need a code formatter like if a specific line ...
Mad coder.'s user avatar
  • 2,175
0 votes
2 answers
880 views

replace space in a string at random position in vb.net

I want to select a random space in a string and replace it with a word (%word%) but there is a problem. The position cannot be fixed as i want it to be inserted at a random break. Few things which iam ...
xhammer's user avatar
  • 145
3 votes
3 answers
5k views

How to prevent richTextBox to paste images within it? [duplicate]

I am programming in c#. and I've a richTextBox on it. At runtime, I insert some Bitmap images into richTextbox by coding. But I want to prevent user that drag my inserted Images or paste some other ...
Ali.M's user avatar
  • 311
1 vote
1 answer
319 views

How to extract font size of content

I've been working on making my own little text editor using a RichTextBox(MyRTB). I've made a Combobox to change the font of the selected text within the RichTextBox when the value changes using this ...
Glenn's user avatar
  • 489
2 votes
1 answer
3k views

How to Add Tables to RichTextBoxes in Visual Basic 2010

How do I add tables to a RichTextBox in VB.NET 2010? I've tried adding the tables by using RTF codes, but I can't get that to work. And there is nothing like richTextBox1.AddTable() which would ...
Stephen Oller's user avatar
1 vote
1 answer
5k views

How to get scroll position for RichTextBox?

I'm working in C#, Windows Forms application, and have a problem getting scroll position for RichTextBox with large amount of text. I'm using this code: public class POINT { public ...
tlombarovic's user avatar
0 votes
1 answer
157 views

image tap fired twice

I have a simple code, with a rich textbox which has an image in it, and the image tap event is fired twice. How can I fix this? The code: <RichTextBox> <Paragraph> ...
Igor Meszaros's user avatar
1 vote
1 answer
296 views

How add EmailComposeTask to RichTextBox in Windows Phone App?

I am want enabled email address in RichTextBox, I search word with @ in text and want to add EmailComposeTask in paragraph. Is this possible?? if (word.Contains("@")) { ??? paragraph.Inlines....
Ivan Byelko's user avatar
1 vote
1 answer
1k views

RichTextBox: Find corresponding index

Say I have a WPF RichTextBox with the following content: Hello Hello // <== here is a line break \r\n Turn Your Radio On! I then read the text from the box with the following code: public static ...
yas4891's user avatar
  • 4,802
1 vote
3 answers
11k views

RichTextBox does not constantly update when used as text status display

I'm trying to use a RichTextBox as a status display but it is not updating every time I append to the text of the RichTextBox. A regular multiline TextBox will update everytime new text is appended to ...
arc1880's user avatar
  • 519
8 votes
1 answer
3k views

RichTextBox BeginUpdate() EndUpdate() Extension Methods Not Working

I have a richTextBox I am using to perform some syntax highlighting. This is a small editing facility so I have not written a custom syntax highlighter - instead I am using Regexs and updating upon ...
MoonKnight's user avatar
  • 23.5k
107 votes
6 answers
157k views

Rich Text box scroll to the bottom when new data is written to it

My program calls Java and then redirects stdout to a RichTextBox. My problem is that the vertical scrollbar always stays at the top of the box every time data is written. Even if you scroll to the ...
user1158745's user avatar
  • 2,460
0 votes
1 answer
309 views

How to delete every second line from RichDataTextBox?

How to delete number of lines from richDataTextBox? I need to delete each second line. For example, I have a text document, opened in rich DataTextBox.. 1. "aaaaaaa bbbbbbb ccccccc ...
user922907's user avatar
4 votes
0 answers
572 views

RichTextBox crashed when insert UIElement into it

When I insert a UIElement into RichTextBox (such as a Button in BlockUIContainer)。I always got an InvalidOperationException said "This TextNavigator No Scoping Text Element" when I edit the ...
Simon. Li's user avatar
  • 404
1 vote
1 answer
742 views

using extended Toolkit Richtext box with mvvm to bind color text

I have a class that looks something like this: public class Line { public Color Color { get; set; } public string Text { get; set; } } I'm using mvvm and right now i'm have have a string ...
poco's user avatar
  • 2,975
3 votes
2 answers
9k views

Bold in RichtextBox

I've been working on my richtextbox but I ran into something weird... I want to make the first word on everyline bold using this code: RichTextBox bold = richTextBox1; foreach (...
Skami's user avatar
  • 1,546
4 votes
2 answers
5k views

Clients want to copy/paste from word processors; rich text editors will make it a mess. How do we solve this?

After years of experience with custom made CMS systems, I come to this conclusion: Clients really want to copy and paste information from word processors into their website CMS. They don't like to ...
user avatar
0 votes
1 answer
387 views

Ignoring spell-check for a particular word in RichTextBox in wpf

In my application I need to ignore the spell-checker for some specific words,how to do that.I am using WPF RichTextBox.
Sarita's user avatar
  • 13
3 votes
1 answer
228 views

FlowDocument TextElements only allowed a single parent

I built a new FlowDocument Paragraph B by examining/using elements of an existing Paragraph A. To my surprise the elements I added to the new ParagraphB were magically deleted from ParagraphA. I ...
aidesigner's user avatar
13 votes
2 answers
13k views

Dynamically adding hyperlinks to a RichTextBox

I'm trying to dynamically add some hyperlinks to a RichTextBox using WPF and C# but am not having much success. My code is summarised below: FlowDocument doc = new FlowDocument(); richTextBox1....
PaulN's user avatar
  • 339
1 vote
3 answers
385 views

Adding a rich text description to blog properties in the Orchard CMS

I'm setting up a site on Orchard CMS and I want to put links into the description of each blog. Currently it just has a space for text in the Description but I need rich text. Can I add a rich text ...
Ross's user avatar
  • 362
0 votes
1 answer
2k views

How to retain colors of texts in rich text box?

I put some colored text to my rich text box my using the following code: richTextBox1.SelectionColor = Color.Blue; richTextBox1.SelectedText = "Name"; richTextBox1.SelectionColor = Color.Black; ...
Xel's user avatar
  • 561
3 votes
3 answers
2k views

.NET RichTextBox Tab Character

I'm using a RichTextBox control in a .NET Windows Form application. I allow users to press the TAB key within the textbox itself. However when I save the .Text value in the textbox it will show up ...
mint's user avatar
  • 3,413
3 votes
3 answers
5k views

jquery minimal rich textbox plugin

I am looking for a very minimal jQuery rich textbox plugin for a web app I am working on. The user will only need to see the 'textbox', and not any toolbars as all of the rich formatting will be ...
Nick's user avatar
  • 339
4 votes
1 answer
3k views

How can I insert an image into a WPF RichTextBox at runtime in between text so the text floats around the image

I am trying to insert an image into a WPF RichTextBox at runtime in between text so the text floats around. I tried using a floater but the end result is that only one line can be set next to the ...
Gert's user avatar
  • 401
1 vote
1 answer
2k views

Print string with differently colored characters in a listview/textbox control

I would like to print the output of an algorithm (C#,.NET 4.0)in a listview control or a multiline textbox(or rich textbox) strings containing some characters which are in a different color.For ...
agatha's user avatar
  • 1,513
0 votes
2 answers
982 views

Styling richtextbox in windows phone 7 from code

So I want to style richtextbox text from code, but I don't know how. There are two variables in the text, and I want the second one to have the accentcolor, and 2pt bigger fonts.
adam014's user avatar
  • 25
1 vote
2 answers
3k views

How to detect URLs written or pasted in a RichTextBox in WPF application

Sometimes a user will type a website URL while chatting in a Chat Application. I need to make the RichTextBox detect these URLs automatically, but I do not know how. General TextBox does not detect ...
Sarita's user avatar
  • 13
2 votes
3 answers
4k views

Remove white spaces between C# Flowdocument elements?

I would like to be able to remove the white spaces between various inline elements of a FlowDocument. Below is a very specific example just to make the problem clear. The desired output is "Hello ...
aidesigner's user avatar
6 votes
1 answer
3k views

How to make <UIElement> interactable or click-able in WPF UI

This is my first day to design UI using WPF. I have looked up MSDN official document of Flow Document and found that I can place an UI control inside a RichTextBox. I did put a button in but found it'...
JXITC's user avatar
  • 1,170
0 votes
2 answers
3k views

How can I synchronize two scroll bars?

I want to sync two scroll bars; when the user up/down scroll2 auto set scroll1 with same postion. The scroll2 is an instance of an RichTextBox and scroll1 is an instance of ListView. I have no idea ...
Jack's user avatar
  • 16.5k
0 votes
2 answers
289 views

How to get coordinates of scroll on RichTextBox?

I'm writing an very simple text editor with highlight of digitis, in some keywords and special chars. Now I'm implementing the line numbers,for do it I'm using a ListView, that is updated to each new ...
Jack's user avatar
  • 16.5k
0 votes
1 answer
580 views

select underlined text from rtf using regex

i want to select the next piece of text which is underlined. You see the rtf of a richtextbox has following code for an underlines text : \ul\i0 hello friend\ulnone\i But the normal text looks like ...
xhammer's user avatar
  • 145
4 votes
1 answer
3k views

How do I jump to a specific line in a RichTextBox?

I'm looking for an example code how to jump to a specific line of a RichTextBox in WPF. I have no idea how to do this, in winForms it is very simple because I'm free to can set SelectionStart and ...
Jack's user avatar
  • 16.5k
6 votes
5 answers
3k views

what is best way to sort lines in RichTextBox

I'm looking for the best way to sort lines of RichTextBox, I'm using this at moment: public void SortLines(object sender, EventArgs e) { TextPointer pStart = TextInput.Document.ContentStart; ...
Jack's user avatar
  • 16.5k
4 votes
1 answer
2k views

C# can I Scrape a webBrowser control for links?

I'm currently learning C# and its fun so far, but I have hit a roadblock. I have a program that can scrape a webpage inside the web browser control for information. So far I can get HTML ...
Gates's user avatar
  • 43
0 votes
1 answer
521 views

Determine if selected text is Hyperlink in RichTextBox?

I also am hoping to populate a text box with the URL of the selected Hyperlink. I think I am along the right path with this code, but I don't know how to complete it: TextPointer position = ...
user1036379's user avatar
4 votes
1 answer
3k views

RichTextbox SelectionStart returns wrong index

I need to show the user, like in notepad.exe, the selection start and length of his text on cursor. Selection length is no problem because Richtextbox supports the Selection Property with Start and ...
Nasenbaer's user avatar
  • 4,860
2 votes
2 answers
12k views

How to update a RichTextBox from BackgroundWorker using BeginInvoke

I have a small app that reads in a pipe delimted file and writes out lines to a RTB, highlighting if there are dissallowed characters in certain "columns". This is working perfectly...however, the ...
BlueChippy's user avatar
  • 6,021
-1 votes
1 answer
264 views

Logic of RichTextBox.Paste() method

What is the internal logic of RichTextBox.Paste() method which pastes data from clipboard to RichTextBox. Actually I want to add text to RichTextBox at the location where cursor is there on button ...
user889515's user avatar
6 votes
2 answers
7k views

Databinding RichTextBox.Text to a String

Trying to bind a String to a RichTextBox.Text property so that when the String value changes, that change is reflected in the RichTextBox. So far I'm unsuccessful. string test = "Test"; rtxt_chatLog....
user983110's user avatar

1
51 52
53
54 55
72