richtextbox

Build up formatted text programmatically to display in a RichTextBox?

What I'd like to do is build up a string with specific formatting to be displayed in a RichTextBox control. Something like this (this doesn't completely work): Dim testText as String = "" testText = "Test text" & vbTab & "with a tab." & vbCrLf testText = testText & "<b>This just prints out verbatim. How do I make it print bold?</b>" ...

WPF's RichTextBox performance issues

WPF's RTB is terribly slow when working with any realistic amount of text. And by realistic amount, I mean what you'd expect any text editor to be able to handle (100kb? At least) without showing any signs of slowness. This expected RTB behavior is not the case for me. Actually, the control works pretty much like it should when text is ...

RichTextBox.RTF return unicode format or ANSI format?

Recently, i'm very confused about the RTF format. I check the RTF 1.6 spec from MSDN, which is native supported in .Net. RTF 1.6 will support Unicode by \uN, and for ANSI, RTF will support multiple byte language via codepage. If we use RichTextBox.RTF to retrieve the RTF format, which format will be returned? Unicode? or ANSI multiple by...

WPF richtextbox selection problem

i have two richtextboxes one below the other in my application.when the user start selection in one richtextbox and continue to the other richtextbox selection should automatically move to the second richtextbox.is there any way to do this type of selection. thanks in advance, dhyanesh ...

WPF richtextbox selection issue

i ve two richtextbox one below the other. when i mouse select in one rich textbox.the other richtextbox mouse selection should not be deselected.Is there any way to do this. ...

Insert a Hyperlink at a specified position in a WPF FlowDocument

I'd like to insert a WPF Hyperlink element into a FlowDocument programmatically. The objective is to create a toolbar button that would take a run of text within a RichTextBox and replace it with a Hyperlink. It's the same sort of interface you see on the web for creating hyperlinks on wikis or in blogs (or on StackOverflow). I can fi...

WPF Richtextbox and keyboard shortcuts

Hello, I'm implementing a WPF application with a richtextbox for German users. They want to use their "normal" keyboard shortcuts to do some basic formatting: bold, italic, underline. In English, the shortcuts CTRL+B, CTRL+I, and CTRL+U are working in the Richtextbox. However the "normal" German shortcuts are CTRL+SHIFT+F (Fett = Bol...

WPF RichTextBox: How to change selected text font?

Hi, how can I change the font for a currently selected text area inside a WPF RichTextBox? ...

How to position a find dialog to not cover the found text?

I created a modeless find dialog for use in searching in a RichTextBox and am having trouble positioning the find dialog after the found text is selected so that it does not cover the selected text. I have tried to get the line number relative to the client area using the following: this.lineCount = this.rtb.Height / (this.rtb.Font.Hei...

hw to use richtext box for maintain text formating?

I am creating such application where user can post there articles upto 800-1000 words . What should I use to maintain text formating like paragraph, next line etc.(if i use textarea as input textbox for article?). I am using mySql so what shod my datatype to store article text VARCHAR or TEXT?? and what shoud be the size for 1000 words? ...

How do I load an rtf file to a WPF RichTextBox in Powershell

Anyone know hoe I can load an rtf file to a wpf RichTextBox? In Windows.Forms I would do this RichTextFile.Loadfile(c:\myfile.rtf) but I don't know how to achieve the same in WPF! Thanks, Ben ...

How to display an rtf file in WPF with Powershell?

I've been googling in vain for hours, and can't seem to find a way to view an rtf file in a powershell WPF form. I can get the rtf file using: $myContent = gc c:\myContent.rtf but when I try to display it using: $RichTextBox.appendText($myContent) I get the encoded rtf, not the properly formatted content. Anyone have a way to do ...

AnimateWindow API transparency problem with RichTextBox

I'm using the AnimateWindow API to show or hide a Form with a slide animation. The problem is that if the Form contains a RichTextBox control, it doesn't display this control correctly. It's transparent and doesn't show any text. After the animation is complete, double clicking somewhere in the control will reveal lines of text. I've c...

WPF RichTextBox Selection property bug?

Hi. The next code works perfectly (it changes the font size for -only- the selected text): MyRichTextBox.Selection.ApplyPropertyValue(RichTextBox.FontSizeProperty, 18); But the next code changes the font for the entire document, not only the selected text: var SelectedFont = new FontFamily("Tahoma"); MyRichTextBox.Selection.ApplyProp...

EditingCommands of the WPF RichTextBox loose its binding when they are not put within a ToolBar

Using the below code in a DataGridTemplateColumn of the DataGrid, my formatting buttons are disabled(grayed out). The formatting buttons are only enabled when they are put in a ToolBar. When the buttons are put in a ToolBar I do not need the CommandTarget. So when I put them outside a ToolBar some could think it must work with CommandTa...

Why does the Rich Text Box freeze when loading a large string?

I have a program where I basically need to load Rich Text from a StringBuilder. The problem is, somethimes I get a string that is 100,000 lines long (and this is a possible situation for the program), including Rtf codes and colours. The problem isn't building the string, it's when I asign the Rtf property to the StringBuilder.ToString...

PyQt4 rich text editor WYSIWYG toolbar to set basic text properties

I'm using PyQT4 to create a little GUI that allows people in my lab to write notes about physiological experiments. Right now I've got plain text editing going but it would be nice if the user could use rich text editing to set the currently selected text's font properties, bold/italic/font/font size would be sufficient. I am specificall...

How to override an inherited property from RichTextBox?

I wrote a custom control in C# that inherits from the RichTextBox. The purpose of this control is to contain all improvements and changes, such as modified line numbering and having the control repaint itself only when it should. Yesterday, I noticed memory spikes (and often, OOM exceptions) when accessing the Lines property of this co...

RichTextBox scroll

I'm not sure what is going on with a RichTextBox in a Visual Studio C# windows application. This is not a web app. I have a procedure that processes several files. As it processes, it posts progress reports in the RichTextBox using AppendText. (The additions have newline chars which keep things neat.) This procedure was migrated from on...

Ckeditor toolbar buttons, how do you get a button to wrap heading tags.

Hello. I was wondering if anyone knew if there was a toolbar config name you could add to ckeditor that gave you buttons to wrap content in heading tags? Just like the bold button for example, highlight the word and click 'h1' or 'h2'? I've looked in the docs but I cant seem to find a comprehensive list of all the possible toolbar but...