richtextbox

How to set RichTextBox Font for the next text to be written?

Hi, I need to set the font family for the next text to be written in a RichTextBox. I tried setting that with... <RichTextBox x:Name="RichTextEditor" MaxWidth="1000" SpellCheck.IsEnabled="True" FontFamily="{Binding ElementName=TextFontComboBox, Path=SelectedItem}" FontSize="{Binding ElementName=TextSizeComboBox...

Calling Win32 API SendMessage in C# richtextbox to copy selected text returns one character less..

Hi, I am trying to copy the selected text in the active window using the win32 API SendMessage as following [DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, uint Msg, out int wParam, out int lParam); int start,next; SendMessage(activeWindowHandle, 0xB0, out start, out next); This returns the starting and e...

how can i simulate CTRL+C in C#

I have the following code which works fine in notepad but not in WORD!! [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); [DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow(); [DllImport("user32.dll", SetLastError = true)] public static extern uint GetWindowThreadPr...

WPF Button to scroll Textbox

I have a RichTextBox and a button. Is there any easy way to make the textbox scroll down / up when i press the button? my guess is i have to use commands but im not 100% sure how commands work. ...

Rounded Corner of RichTextBox in wpf

It is possible to make RichTextBox have corner radius in wpf. i know it can achive using ControlTemplate but how? I hope some of you may provide me with a hint. ...

Suggestions on a web based rich text editor...that supports code blocks?

I read this post: http://stackoverflow.com/questions/21274/what-is-the-easiest-to-use-web-rich-text-editor and followed up with most of the suggestions, but haven't found any that supports code blocks - What does stackoverflow use? Thanks, Sam ...

Using Rich Text Box with Infopath and Webservices

I would like to retrieve and submit data that contains Rich Text to a webservice but I am having problems with the particular datatype on the webservice side. If I have a simple string type coming from the webservice, infopath will not allow a RTF box as it is not the correct datatype (which is XHTML). Anybody have any Ideas? Edit: St...

RichTextBox: How to determine if text extends beyond the control bounds? - Horizontal Scrollbar appearing when it shouldn't after sending EM_SETTARGETDEVICE and then resizing the control

I have extended the RichTextBox control to implement much of the missing functionality provided in the native RichEdit class. I'm running into an issue where if the control is set to wrap to the window or to wrap to printer the horizontal scrollbar appears even though it shouldn't when the control is resized. Cycling the wordwrap to ...

Rich Text Editor with Gmail style spell check

I am after a JavaScript Rich Text Editor that supports highlighting words and triggering events when those highlighted words are clicked, like what Gmail does when in spellcheck mode. I will need to heavily customize any existing solution, so something that is easy to extend would be ideal. Currently I am leaning towards TinyMCE. ...

C# RichTextBox strange behaviour

greetings, for the first time ever im investigating RichTextBox control in C# windows forms. i know i need this control in my app as textBox is to simple for my needs. i have the followig code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using...

RichEdit / RichTextBox scollbar length, grab handle width, enabled/disabled, etc... How is all this controlled?

I have another question open regarding an error I'm experiencing with the horizontal scrollbar of a RichTextBox not functioning properly and am not getting much response. It came to me that I might be asking the wrong question. My new question is how do the scrollbar properties get set/controlled. I know I can SendMessage to change the...

"Caret Position" in VB.NET for syntax highlighting

Hi, I'm trying to make a TextBox with syntax highlighting (for (HTML/CSS) in VB.NET 2008. I figured that if I use RichTextBox.Find(), I can color specific text, but then I need to call RichTextBox.DeselectAll(). The problem is that the the cursor jumps to the beginning of the RTB. I'm using WinForms. Any ideas? ...

C# RichTextBox Color parts of a string different colors

I'm trying to color parts of a string to be appended to a RichTextBox. I have a string built from different strings. string temp = "[" + DateTime.Now.ToShortTimeString() + "] " + userid + " " + message + Environment.NewLine; This is what the message would look like once it is constructed. [9:23pm] User: ...

Removing resize handlers on contentEditable div

I created a contentEditable div to use as a rich textarea. It has resize handlers around it that I'd like to get rid of. Any idea how I'd do this? Edit: This appears to be happening because I am absolutely positioning the div, so Firefox adds an infuriating _moz_resize attribute to the element which I cannot turn off. ...

Why isn't the richtextbox displaying this table properly?

Apparently, the RichTextBox provided by Microsoft doesn't fully support the RTF specs. For some reason, it won't permit multi-lined rows, and destroys formatting instead. Forexample, here is the RTF code to generate a table: \par \trowd\trgaph108\trleft36\trqc\trrh280\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \cellx2000\cellx4000\cellx...

How to change the background color of a rich text box when it is disabled?

Whenever I set the RichTextBox.Enabled property to false, its background color is automatically set to gray as it is set to the color in system color which is set in the control panel. How can I change its color to black even if I set it to disabled? ...

How do online rich text editors work?

I was wondering how online rich text editors maintain the formatting when you paste text from a webpage or document. A standard textarea box only takes text while these WYSIWYG editors seem to use a DIV. How does it work? ...

Free Component which can show richtext with pictures Delphi

I need a free component like RichEdit, but which can also show pictures inside. I am using Delphi 7. Unfortunately RichEdit cannot show pictures, and few components which can are not free. ...

How to view/edit RTF subscripts in WPF RichTextBox

Hi, I've got the following RTF fragment as data to display in a WPF rich text box. C\dn4\fs14 6\up0\fs18 H\dn4\fs14 12\up4 +2\up0\fs18\par It looks like the \dn4, \up0 and \up4 tags are ignored by the WPF rich text box, which displays this fragment with varying sizes (fs14 and fs18), but with a common baseline for all of the text. Is...

make a richtextbox only have one font, even if pasted into (vb.net)

I need to use a richtextbox, not a normal textbox because of the way it keeps the caret position, from line to line. But I need to keep the text at the same font all the time even if it is pasted. At the moment I have it selecting the entire text and changing the font to the original (Lucida Console) but it look horrible when you paste ...