richtextbox

Richtextbox display freezes system

I have a .net2/c# application. It receives data from a socket, formats and displays in a richtextbox control. The communication happens in a seperate thread. The received data is added to a queue that the display function extracts. Quite some heavy duty formatting is done- sorting, coloring etc. The Display function is in the main thread...

An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll

OK, Im trying to highlight keywords in a richtextbox, the problem is I've got the code to highlight only the visible text on textChanged event,so I tryed putting the code in the richtextbox VScroll, so when I scrolled up it would highlight the text that wasn't visible before, but every time I start to scroll I get this error: "An unhandl...

How to upload a .txt file as a .rtf file in C# ?

How can I load a pre-existing .txt file as a .rtf file in my C# code if I want to display it on a richTextBox? I am running Visual Studios Windows Application. Thank you very much. ...

How can I optimize this or is there a better way to do it?(HTML Syntax Highlighter)

Hello every one, I have made a HTML syntax highlighter in C# and it works great, but there's one problem. First off It runs pretty fast because it syntax highlights line by line, but when I paste more than one line of code or open a file I have to highlight the whole file which can take up to a minute for a file with only 150 lines of co...

Why does GWT's RichTextArea implement HasInitializeHandlers?

...and what can I do with my RichTextArea after the onInitialize method has been called that I cannot do before? N.B. This is a cross-post from the GWT Google group, which produced no response. ...

Convert XAML to FlowDocument to display in RichTextBox in WPF

I have some HTML, which i am converting to XAML using the library provided by Microsoft string t = HtmlToXamlConverter.ConvertHtmlToXaml(mail.HtmlDataString,true); now, from http://stackoverflow.com/questions/1449121/how-to-insert-xaml-into-richtextbox i am using the following: private static FlowDocument SetRTF(string xamlString) ...

Detecting GWT RichTextArea 'dirty' state

I want to detect when the contents of my GWT RichTextArea become 'dirty' (have been changed by the user) in order to enable a 'save' button accordingly. I suppose I could listen for key presses that are likely to have changed the contents; but browser support for key presses is notoriously quirky. I suppose I could, before editing begi...

Limit the length of SharePoint Rich Text Box

Hi All, In My SharePoint site I have a list containing rich text box column. I want to limit the max lenght of text in this textbox but I could not found any property for that. Can anyone help me to achive this ? Thanks in advance Sachin katkar ...

attach event to sharepoint multiline textbox having text type "Enhance Rich Text"

Hi All, I have to attach OnKeyPress event to the SharePoint multiline column with text type as "Enhance Rich Text". Following is the jscript code that I am using <script> var ele=document.getElementById(inpID); if(ele!=null){ ele.onkeypress=function(){calLen(this);}; } function calLen(obj) { if(obj.value.lengt...

RichTextBox.AutoWordSelection broken?

I am writing a windows forms application in C# and I create a RichTextBox (via code, not the designer). I am setting the AutoWordSelection property to false, but when I highlight stuff in the box, it still jumps to the boundaries of words, plus a space. Is this a flaw in .NET or am I doing it wrong? ...

How do I .MatchCase and .WholeWord?

Hello, Ive been making a find, find next function for my richtextbox, so I have these check boxes to let the user search by whole word or case sensitive or both, and I got the first two, to work but I can't get it to work with both case a whole word checked, here's my code: if (isWhole == true && isCase == true) { ...

Using RichTextBox SelectionTabs property in winforms

In a winforms application, I'm using a RichTextBox and I'm trying to reduce the output from a '\t' to 4 spaces from whatever the default is. I have this in the form's OnLoad _richTextBox.Text = "1\t2\t3\t4\t5"; _richTextBox.SelectAll(); _richTextBox.SelectionTabs = new int[] {100,200,300,400 }; I have a breakpoint before and after...

managing html rich text selections

Hi, I am writing a component for a web app which will display some html, and let me capture and manipulate the selection boundaries (of the text selected by the user). I have done this successfully (for Mozilla) with a simple div element using window.getSelection(). However, the browser selection API is different for IE. If I were to ...

Editing Many RichTextBoxes and TextBoxes

How do i cut,copy,paste from main menu in a multi textboxes form ? How does the menu knows to apply on the active textbox ? ...

C# Richtextbox - diacritics font problem

Hello, I am using C# 3.5 Richtextbox and the component has Verdana as a default font. My problem occurs after inserting some f.e. Czech text from Web browser (or with method AppendText), there is my RTF: {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset238{*\fname Courier New;}Courier New CE;}{\f1\fmodern\fprq6\fcharset134 Adobe ...

Undo/Redo Support for Table Changes in WPF RichTextBox

As part of an editor project, I need to add functionality to the WPF RichTextBox control to allow the user to perform operations on a table. One of those operations is to apply a new width value to one or more columns of the table. I have a function that is applying a new Width value to the TableColumn objects in question, and the tabl...

How to set a RichTextBox in Silverlight 4 to fit it's parent height and maintain it on resize?

I am having hard times figuring this out. Here is what I need: <StackPanel x:Name="container" VerticalAlignment="Stretch"> <RichTextBox Height="???" /> </StackPanel> Basically what I know I can do is to bind RichTextBox Height to it's parent's height ( Height="{Binding ElementName=container, Path=ActualHeight}". Unfortunately th...

textarea with bullet point for each line

I have a textarea where users enter notes and want to automatically add a bullet point for each line. I was thinking of using a rich text editor (eg CKEditor) with bulleted mode enabled. Any better ideas? ...

Paragraph spacing in the Silverlight 4 RichTextBox control

I am using the Silverlight 4 RichTextBox control which works really well. The problem I have is that the paragraphs are displayed within the control with no spacing between them, so it just looks like a newline. I've tried setting some styles on the Paragraph type but the Silverlight version seems to have no Margin or Padding properties...

issue with richtextbox window size on wordwrap

I have problem in a c# windows form application. It has a tab control with 3 tabs. Each of the tabs contains a richtextbox control. I have a toolbar button to "toggle wrap". The richtext box properties are exactly identical in the 3 tabs. The following code for toggling wrap will "hide" the rictext control ONLy in the 3rd tab. Other tabs...