richtextbox

How to create a Rich Text box with or without web view in xamarin forms?

一个人想着一个人 提交于 2020-01-23 12:27:46
问题 I want create a Rich Text box with or without web view in xamarin forms. I tried many examples but none of that worked for me. The examples are https://github.com/XAM-Consulting/TEditor The problem with this example was, it is too slow for me and it was not editing my text at all. And it was getting crash numerous times. So I tried to follow this example https://forums.xamarin.com/discussion/95318/rich-text-box-in-xamarin-forms but the code by Adam.Else gave me lots of bugs and it was not

RichTextBox doesn't start selection on mouse down when the form has not focus

只愿长相守 提交于 2020-01-22 15:09:45
问题 I'm using WinForms and on my Form I have a RichTextBox. When my form is out of focus but visible and I try to highlight/select text, it does not allow me to until the form or textbox itself has focus. I've tried: txtInput.MouseDown += (s, e) => { txtInput.Focus(); } but to no avail and I can't seem to find anything online about this issue. When testing with another program like Notepad, it does possess the desired behavior. 回答1: MouseDown is too late. This is a workaround for sure, but may be

RichTextBox doesn't start selection on mouse down when the form has not focus

怎甘沉沦 提交于 2020-01-22 15:09:44
问题 I'm using WinForms and on my Form I have a RichTextBox. When my form is out of focus but visible and I try to highlight/select text, it does not allow me to until the form or textbox itself has focus. I've tried: txtInput.MouseDown += (s, e) => { txtInput.Focus(); } but to no avail and I can't seem to find anything online about this issue. When testing with another program like Notepad, it does possess the desired behavior. 回答1: MouseDown is too late. This is a workaround for sure, but may be

How to selectively underline strings in RichTextBox?

依然范特西╮ 提交于 2020-01-21 10:21:28
问题 In my program after clicking on the button - selected ListView entries should be copied to RichTextBox. ListView contains contact information, and the effect I want to accomplish is similar to the one in Oultook (when choosing contacts from contact book). Part of my code that serves this purpose looks like that: private void toButton_Click(object sender, EventArgs e) { int start = 0; for (int i = 0; i < contactsListView.SelectedItems.Count; i++) { if (contactsTextBox.TextLength != 0)

How to selectively underline strings in RichTextBox?

那年仲夏 提交于 2020-01-21 10:21:10
问题 In my program after clicking on the button - selected ListView entries should be copied to RichTextBox. ListView contains contact information, and the effect I want to accomplish is similar to the one in Oultook (when choosing contacts from contact book). Part of my code that serves this purpose looks like that: private void toButton_Click(object sender, EventArgs e) { int start = 0; for (int i = 0; i < contactsListView.SelectedItems.Count; i++) { if (contactsTextBox.TextLength != 0)

How to selectively underline strings in RichTextBox?

痴心易碎 提交于 2020-01-21 10:21:03
问题 In my program after clicking on the button - selected ListView entries should be copied to RichTextBox. ListView contains contact information, and the effect I want to accomplish is similar to the one in Oultook (when choosing contacts from contact book). Part of my code that serves this purpose looks like that: private void toButton_Click(object sender, EventArgs e) { int start = 0; for (int i = 0; i < contactsListView.SelectedItems.Count; i++) { if (contactsTextBox.TextLength != 0)

How to find a TextRange in RichTextBox (between two TextPointers)

两盒软妹~` 提交于 2020-01-20 08:34:47
问题 In my System.Windows.Controls.RichTextBox, I would like to find a TextRange of a given word. However, it is not giving me the correct PositionAtOffset after the first found word. The first one is correct, and then for the next found words, the position is not correct. Am I using the correct methods? Loop through listOfWords Word= listOfWords[j].ToString(); startPos = new TextRange(transcriberArea.Document.ContentStart, transcriberArea.Document.ContentEnd).Text.IndexOf(Word.Trim());

Removing resize handlers on contentEditable div

本小妞迷上赌 提交于 2020-01-19 10:06:30
问题 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. 回答1: Just as a side note, you can disable Firefox's automatic resize handle feature by sending the (somewhat poorly-documented) enableObjectResizing command to the document:

Removing resize handlers on contentEditable div

╄→гoц情女王★ 提交于 2020-01-19 10:06:26
问题 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. 回答1: Just as a side note, you can disable Firefox's automatic resize handle feature by sending the (somewhat poorly-documented) enableObjectResizing command to the document:

Editing Many RichTextBoxes and TextBoxes

断了今生、忘了曾经 提交于 2020-01-17 03:28:17
问题 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 ? 回答1: Please see this article here on Codeproject that does the job in synchronizing each text box's "standard" edit menu such as Copy, Cut, Paste, Undo, Select All. Of course, the code originally targets the .NET 1.1, but it can be easily recompiled to target the newer frameworks as well. 回答2: In the menu click event you can examine this.ActiveControl to see what control