richtextbox

My custom WPF RIchTextBox will not accept user input, even after setting IsReadOnly=false

I have written a custom Bindable RichText Box, so I can bind to the Document property. However, as soon as I set my document content, the only keyboard input it accepts is the backspace key (???). No other keyboard input is acknowledged (including the arrow keys). Any ideas? Here is the code of my BindableRTB class: Imports System.W...

YUI Rich Text Editor: Text coloring tools are not working.

I'm using YUI RTE (version: 2.8.0r4). Only the text coloring tools are not working. It is enabled when I highlight the the text, but when clicking on the icon is not opening the color picker. Pls look at the snapshot, var myEditor = new YAHOO.widget.Editor('body', { height: '300px', width: '99%', ...

RichTextBox CaretPosition physical location

Hi, I'm using a RichTextBox class to make some automatic text formatting. And mz question is, how do I get the RichTextBox to put some string immediately after the caret. When I use RichTextBox.CaretPosition.InsertTextInRun("some string") the text is inserted after the current logical block, but I need to be insterted immediately after ...

How can I access one window's control (richtextbox) from another window in wpf?

I'm sure this is something very simple but I can't figure it out. I've searched here and on msdn and have been unable to find the answer. I need to be able to set the richtextboxes selection via richtextbox.Selection.Select(TextPointer1, Textpointer2). Thanks for your help! ...

What is the most efficient way to count all of the words in a richtextbox?

I am writing a text editor and need to provide a live word count. Right now I am using this extension method: public static int WordCount(this string s) { s = s.TrimEnd(); if (String.IsNullOrEmpty(s)) return 0; int count = 0; bool lastWasWordChar = false; foreach (char c in s) { ...

Get the standard context menu for System.Windows.Forms.RichTextBox

How can I get the standard context menu in a RichTextBox, like the one in TextBox (Copy, Paste, IME etc.)? I'd go with a P/Invoke solution if nothing is available out of the box. Or do I really have to follow those strange advices to create a custom menu to get a standard menu (sigh)? ...

C# Windows Forms RichTextBox cursor position

Hello everyone! I have a C# Windows Forms program that has a RichTextBox control. Whenever the text inside the box is changed (other than typing that change), the cursor goes back to the beginning. In other words, when the text in the RichTextBox is changed by using the Text property, it makes the cursor jump back. How can I keep the c...

Silverlight 4 - Mousewheel stops scrolling ScrollViewer when over contained RichTextBox

I have a Silverlight 4 out-of-browser application with a ScrollViewer that has several RichTextBoxes inside. The RichTextBoxes are only used for displaying text, and are never edited and never scroll. However when the mouse is hovering over a RichTextBox the mousewheel event seems to not reach the ScrollViewer. Is there any way to ove...

Silverlight 4 RichTextBox Bind Data using DataContext

I am working with Silverlight 4 and trying to put my test apps multilingual but I am having some trouble when I arrive to the "RichTextBox" control. I am able to bind it properly by doing back-code (c#), but when trying using the "DataContext" attributes I am not able to load it at all. I have created a FormatConverter that return a Blo...

Set WinForms RichTextBox as the source of a PrintDocument

I want to print the contents of a RichTextBox, so I am trying make a PrintDocument out of the RichTextBox. But I dont find a way to convert a simple RichTextBox to a PrintDocument. Any ideas? ...

displaying a large amount of formated text in Python

I have two large identical-sized files. One is ASCII plain text, and the other is a colour-coded overlay, one byte per text character in the corresponding file. These files can be large - upto 2.5 MB; possibly substantially more, perhaps over 100MB later. I want to display the text is a scrollable text viewer, using the second file as...

Flex: RichTextEditor -- get and set RICH Text?

Given a rich text editor, I want to save the "rich" text to a database, and load it later. So how can I get and set the rich text? I looked at the API and there is a property called text which is only PLAIN text, not what I need. There is another property called textSnapshot which sounds like maybe thats what I need to use, but its REA...

Changing font using a font dialog c#

Can anyone tell me how I can change the font using a font dialog. I'm trying to get it so either the selected text changes or if no text is selected only the font after the marker gets changed (not the whole textbox). This is what I have so far. Thanx private void menuFont_Click(object sender, EventArgs e) { if (fontDialog...

How can I get the maximum value of a richtextbox's vertical scrollbar?

I need to get the maximum value of a richtextbox's vertical scrollbar so that I can scroll to a percentage of the scrollbar's maximum value. ...

How to find text in a richtextbox

I have 2 forms. A main one which has a richtextbox on (aswell as other stuff) and another which is used to find text in the richtxtbox on frm1. The second form consists of a textbox for the user to enter the word they are looking for, and 2 buttons. One for Find and one for Find next. When the find button is selected the found text is h...

Is CFE_LINK stored in RTF RichEdit 3.0?

I am using MS TextServices to implement windowless rich text editing and setting CFE_LINK to create hyperlinks. This all works but when I save the text to my internal buffer for writing to a file the CFE_LINK effect isn't saved. I have (tried to) ensured that AutoDetectURL is OFF. I am using EM_STREAMOUT to save from editor to buffer, ...

Need help with scrolling to a percentage of richtextbox's maximum scroll amount (the richtextbox is in a scrollviewer).

I am trying to make it so that a user can ctrl-click outside of a richtextbox to scroll to a percentage of the richtextbox's maximum scroll amount based on the y.position of the mouse relative to the top of the richtextbox. Here's the code I'm currently using: private void MainWindow_PreviewMouseLeftButtonUp(object sender, MouseButt...

Problem with richtextbox.

When I first run my program and type some text in the richtextbox, if I press enter, which causes the carat to move to a new line, and then press backspace instead of going to the previous line it just moves back a space even though I haven't typed any text on this new line. I can't figure out what is happening. What am I doing wrong? An...

How to find text in a richtextbox on another form c#

Hi I have 2 forms, one with containing a richtextbox and the other used for finding text in this rtb. On this Find form is a textbox and 2 buttons , "Find" and "FindNext" I've no idea how to link the 2 forms together to find the text and also how to find the text :-S Any help please?? ...

problem with code. Searching text in a rtb c#

I have 2 forms One includes a richtextbox the other is used to search for text in this rtb My code is showing an error and i dont know how to fix it. This is the line that shows the error RichTextBox box = ((Form1)base.Owner).rtxtEditor; It's saying "Object reference not set to an instance of an object." This is my whole code. p...