richtextbox

WPF RichTextBox - Disable input on certain paragraphs.

Hi, I would like to be able to stop the user from modifying certain portions of text in my WPF RichTextBox. To do this, I am handling the PreviewKeyDown event and setting the Handled property to true so that no further processing takes place. The problem with my approach is that navigation keys are also disabled. I know that I could de...

Change line spacing in winform RichTextBox

I'm using in my winform project a RichTextBox control to display a kind of old console screen. This works perfectly but there is a space between the lines. Is it possible to change this space to be 0 or anything near that. If i paint a line from vetical line from line 1 to line 5 i don't want any spacing between the line. Hope you can ...

need jQuery plugin for making items in textbox (like outlook)

Hello, i was wondering is exist a jQuery plugin for making items in intput text. I mean for example if you write message in Outlook and in recipients line you enter 2 contacs - when you pres backspace you delete whole email address. Not only first word like in normal textbox. It there any solution to do this in jQuery? Thanks! ...

How to display an .rtf file in a Powershell RichTextBox

I want to display the content of an RTF file in a Powershell RichTextBox. I am trying to make a kind of custom EULA, and the easiest way to do it would be to write the content in an RTF file and then have it display in a RichTextBox on my form, so the user has to click a checkbox to accept it. (I'm sure this sits between ServerFault an...

WPF; How to make a TextDecoration not be autoexpanding?

Hi, I'm applying a TextDecoration to a TextRange in a RichTextBox. Works fine except that if the user types at the end of the range, then the decoration is continued. Eg. if the word "am" is decorated in "I am here" and the user changes "am" to "am not", then all of "am not" will be decorated. I just want "am" to be decorated. Any ...

VB.NET: Syntax Highlight

Hi, I started to learn VB.NET and I'm trying to do a syntax highlight. The problem occurs when i set the color of selected text. It changes the whole richtextbox's content. Private Sub txtText_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbText.TextChanged Dim keywords As ArrayList Dim index...

WPF RichTextBox - Merge/Split cells

I´m developing a rich text editor using the WPF RichTextBox control. I´ve been searching for a way to implement merge and split functionality on selected cells/rows, but can´t find a good way of doing that. Anyone who knows? Edit: Anyone? ...

Winform RichTextBox Change text

How does one change already appended or entered lines on the RichTextBox control? I want to programmaticly insert a Timestamp in front of each line of input. TextBox1.Lines[] does not allow changes. I attempted to set my own array to Lines[] but didn't seems to work. One thinks this is possible. Thanks DJK ...

WPF RichTextBox: Replace text with UI controls @ run time

Hi Guys, I need to develop a messenger-like text box, where certain tokens are being replaced with UI controls. Just for example, if the user types :-) it should be replaced with a smiley image. I have previous experience with WPF's RichTextBox and i understand the concept of TextPointer and TextContent. I just don't know how to repla...

How do I convert text to hyperlink in a WPF RichTextBox FlowDocument?

Hi. I'm trying to turn some text to Hyperlink while a user is typing in WPF RichTextBox. My first attempt at it involves running this code at each KeyUp: Regex r = new Regex("[A-Z]{3}"); FlowDocument doc = this.inputBox.Document; String text = new TextRange(doc.ContentStart, doc.ContentEnd).Text; foreach (Match m in r.Mat...

jQuery RTE Recommendations

There are some decent JavaScript-based RTEs out there, but when it comes to jQuery plugins, the selection seems to be quite sparse. What are the most recommended/promising projects (either finished, or in progress) that provide a simple-to-implement RTE using jQuery? Here's what I've found from my research so far: jQuery UI Rich Text ...

How to track the changes of a dnn texteditor in a web form during submitting the page?

Hi, I am trying to create a java script function to keep track of the changes made in a web form while submitting the page. For normal .net textbox or textarea I can compare the value with default value. var ele = document.forms[0].elements; for ( i=0; i < ele.length; i++ ) { if ( ele[i].value != ele[i].defaultValue ) return true...

Silverlight RichTextBox: How to set custom font from resource/stream?

Hi everybody, Does anybody know how to set the font within a RichTextBox from a Stream? TextBlock and TextBox do have the option to set the FontSource, but classes like Run, Paragraph and the whole RichTextBox miss that. :( Any reason for that? Is there any known way to achieve that? I already tried to set the whole source URI withi...

RichTextBox Highlight All Instances of a Phrase

In VB.Net, is it possible to highlight ALL instances of a phrase instead of only a single instance of it, for example: txtView.SelectionStart = txtView.Find("ERROR: Invalid command entered.") txtView.SelectionColor = Color.Red This would highlight "ERROR: Invalid command entered.", however if my RichTextBox text is: ERROR: In...

Uri reference to ressource in assembly loaded on demand.

Hi there, I do load an assembly on demand which holds ressources (fonts) in it. The assembly is being loaded by the AssemblyPart class, and therefore added to the current application domain. txt1.FontFamily = New FontFamily("/SilverlightFontLibrary;component/GRAFFITO_01.ttf#Graffito") Dim kaa = Application.GetResourceStream("/Silverli...

Example of using EM_STREAMOUT with c# and RichEditBox

Hello i trying to get a text from a RichEdit field with WM_GETTEXT, but i run into some problems, so I found EM_STREAMOUT, this is especially for RichEdit. I found this code and played a little bit with it, but i can't get them to work: delegate uint EditStreamCallback(IntPtr dwCookie, IntPtr pbBuff, int cb, out int pcb); struct EDI...

Selecting Word-Parts in C#

While collecting some training data for NLP, I discovered that it is impossible to select parts of 2 adjacent words in a RichTextBox. For example: you can not select "lect Me" from "Select Me" in a RichTextBox using mouse..!! However it can be done using SHIFT key Is there a property to be able to select parts of adjacent words not the...

Dll file and Rich text box

Can I load dll file into rich text box using C#? The dll file will be telnet.dll ...

RichTextBox equivalent of TextBox.AcceptsReturn

I am switching several TextBoxes out for RichTextBoxes to gain some of the cool features. I had my TextBoxes configured to AcceptReturn so that the enter key will create a new line, rather than leave the control. The RichTextBox does not seem to have this feature. Is there a simple way to do this, or do I have to capture all keypresses...

RichTextBox syntax highlighting in real time--Disabling the repaint

I'm creating a function that takes a RichTextBox and has access to a list of keywords & 'badwords'. I need to highlight any keywords & badwords I find in the RichTextBox while the user is typing, which means the function is called every time an editing key is released. I've written this function, but the words and cursor in the box fli...