3,552 questions
0
votes
1
answer
81
views
How to check if selected text Foreground property in a RichTextBox matches the RichTextBox's Foreground property?
Context
I'd like to have a custom code-behind function to simultaneously toggle the FontWeight and Foregroundproperties of the selected text in a RichTextBox.
Reading through these documentations: ...
1
vote
3
answers
166
views
Singular application data file
Context
I have a .NET WPF application with hierarchical data model to manage user activities (a sort of task organizer with built in light text editing & formatting capabilities):
Most parts of ...
0
votes
0
answers
31
views
WinForms: Add RTF \line on manual RichTextBox resize without losing formatting
I want to detect horizontal manual resizing of a RichTextBox in a WinForms app and insert an RTF line break (\line) when the text exceeds the visible width — without using WordWrap and without losing ...
1
vote
0
answers
83
views
How to change the background of entire line of a RichTextbox in winform
I want to change the background of the entire line in a RichTextBox, irrespective it has text or not. The same question as asked here:
How to change background color of the certain line in the ...
2
votes
1
answer
202
views
C# Windows Forms and URL embedded in link names?
I have spent the last few hours trying to do something I thought would be basic stuff in my C# Windows Form application - to have a RichTextBox with embedded links. However, this seems to be far more ...
0
votes
1
answer
78
views
Is it possible to highlight specific text in an InkEdit box used for search results?
This code provides the results of the search and places a bar (|) between each parameter. When there are a dozen results of varying lengths, it can be confusing.
If matchFound Then
results = ...
0
votes
0
answers
62
views
Richtextbox crashes Excel if a Ctrl-C (copy) or a drag and drog is attempted
Windows 11 Pro, 23H2
Richtx32.ocx
Open at new Workbook
Create Userform1
Insert a Richtextbox control
Sub RTBX()
With Userform1
.Richextbox.show 0
End with
End Sub
Enter some ...
0
votes
0
answers
114
views
How to synchronize WinForms RichTextBox painting and non-painting areas
The problem: I need to add some context along with RichTextBox content.
Starting from this post I have come to the conclusion according to
dr-null's suggestion to have this context info placed on the ...
1
vote
1
answer
97
views
Format richtextbox without selection
I want to change the formatting in a richtextbox in two ways:
text is selected => text should re-size. This works fine.
text is not selected, just a caret cursor is set between a text. => font-...
3
votes
1
answer
60
views
RichTextBox ReadOnly after first display partially fails
I'm using a RichTextBox in Windows Forms without any specialties.
When I change the textbox's read-only property in the constructor everything works as expected:
public MyForm()
{
...
...
2
votes
1
answer
81
views
WinForm RichTextbox auto scroll only when scrollbar caret is in the bottom
I am using a RichTextBox in Winforms to display live stream of text. When new data comes in, the RichTextBox scrolls down to display the latest added text.
If the user wants to view previous data by ...
-1
votes
1
answer
162
views
C++/CLI richtextbox text to unicode designation (H -> U+0048)
I want to take a character (or space/tab/new line, if possible) from richtextbox1 and convert it into the Unicode designation(correct word?).
Everything I've found thus far tells me about converting ...
0
votes
1
answer
376
views
How to Set HTML Content in RoosterJS Editor?
I'm currently working with the RoosterJS rich text editor in my project, and I need to set the HTML content programmatically. My goal is to replace the entire content of the editor with a new HTML ...
-1
votes
1
answer
103
views
Sending two different font styles on the text within a RichTextBox
In C#, how can I send/write a string to a RichTextBox control on my internal WinForm, where I can change the font style of a few words of the string to either Bold or Italic style and then go back to ...
0
votes
2
answers
294
views
How to copy and paste in wpf richtextbox containing runs and inlineUICOntainer?
I have created a RichTextBox in wpf containing the below content
<RichTextBox x:Name="RichTextBox"
IsDocumentEnabled="True"
AutoWordSelection="...
0
votes
0
answers
100
views
How do I make indicators different colors for different words?
I'm making a program which allows you to search for terms, and they'll all be colored in a respective color (i.e. you're searching for "wood" and "length", each occurance of wood ...
0
votes
1
answer
62
views
How do I format this richTextBox text?
I am building an app to suggest dates (romantic dates, not almenac dates) based on inputs by the user. In the end, I want to output the inputs into a richTextBox and format it to look something like:
...
0
votes
1
answer
52
views
SfRichTextBoxAdv table borders behave strangely when loading a file from XAML
If i try to save a document to xaml file and then without modifying it at all load it back into the SfRichTextBoxAdv then all the borders on all tables would disappear.
If after loading a xaml ...
1
vote
1
answer
31
views
VB.NET rtf load mydocuments
So, I tried loading a file:
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
RichTextBox1.LoadFile("My.Computer.FileSystem.SpecialDirectories.MyDocuments.**1....
0
votes
0
answers
33
views
In VB.Net, RichTextBox will not adjust to text height when in Panel
Following a suggestion on this site to have a RichTextBox slowly scroll down automatically, I have a RichTextBox inside a panel. The RichTextBox must have a height longer than the Panel to force the ...
0
votes
0
answers
88
views
How do I use font weights other than Regular and Bold? (C# WinForms)
I'm trying to use the SF Mono font in the Medium weight. The FontStyle argument doesn't seem to work with "Medium", and wants either Regular or Bold. This locks me out of Light and Heavy too....
1
vote
1
answer
97
views
How to show diacritic accent mark in WPF RichTextBox
Inside my WPF application there is a RichTextBox and by showing its text content in VS Immediate Window there is a f character with a circumflex accent, but in the display window only renders the ...
2
votes
1
answer
67
views
Forbid to move cursor in RichTextBox past certain position
I am writing a program for entering words by syllable. The logic is, the user is entering part of the phrase (a syllable), and if it's correct it lights out a green color and adds a hyphen in the end, ...
0
votes
0
answers
122
views
Converting RTF file with images to TIFF
I got my .rtf file I generated using MSWord, and I added some images to it, it has 28000 lines, and now I'm trying to convert that rtf file to tiff image. Here's the code I have:
static void ...
2
votes
0
answers
63
views
why in the richTextBox the length of string.Join(Environment.NewLine, lines) is equal to 20 after to add tab in the following example (attached code)
why modifiedtext.Length is equal to 20 and not 16 (=11+5) after to run the block of code in the following example (attached code)
Here is the example of the richTextBox1 before added tab space at the ...
0
votes
1
answer
88
views
How do i Duplicate a line in Richtextbox C#
test 123
after click "duplicate":
test 123
test 123
No matter where the cursor is
copy the entire line to the next line
i tried:
int selectionStart = richTextBox1.SelectionStart;
int ...
0
votes
1
answer
120
views
Parsing .RTF file into a C# RichTextBox erases the Check Boxes
I'm currently trying to parse an RTF file into C# and a lot of information online points to using a Windows.Form RichTextBox to do so. After loading the file and inspecting the RichTextBox.Text ...
1
vote
0
answers
74
views
How to make TextBlock inside of Rich Text Box Non-removable?
private void AddVCard()
{
FlowDocument flowDocument = rich.Document;
Paragraph dp = new Paragraph();
Run fnRun = new Run() {Foreground = System.Windows....
0
votes
0
answers
103
views
Can you use EM_GETTEXTEX to the the selected RTF of a rich edit control?
I"m trying to come up with a way of getting the rich (RTF-formatted) text of a selection within a rich edit control (WinForms RichTextBox) using Win32 API--a way which is guaranteed to include ...
0
votes
1
answer
97
views
How can I stop the user being able to edit text in a richtextbox?
I have a short section of code which dynamically adds a richtextbox to each cell of a tablelayoutpanel, but the user shouldn't be able to edit the text inside.
RichTextBox[,] textList = new ...
2
votes
1
answer
124
views
When pasting text from the Clipboard into a RichTextBox, the new text is not colored in the RichTextBox ForeColor
I created a ToolStripMenuItem for the RichTextBox. In its Click event, I'm pasting into the RichTextBox some text from the Clipboard.
The problem is that in the Form Designer the ForeColor of the ...
0
votes
1
answer
703
views
AppContext.SetSwitch("Switch.System.Windows.Controls.Text.UseAdornerForTextboxSelectionRendering", false); not work for RichTextBox?
When I set AppContext.SetSwitch("Switch.System.Windows.Controls.Text.UseAdornerForTextboxSelectionRendering", false); TextBox behaves normally, RichTextBox cannot display text. What is the ...
0
votes
1
answer
186
views
Why does this error show up accessing the RTF of a RichTextBox?
I have a number of rich text boxes on my application that print data received from a digital modem type device. At times it is necessary to copy a window to another window because some of the text in ...
0
votes
0
answers
36
views
Formatting actions on a small selection of text with the contents of a textbox in a VBA user-form
I have a textbox within a userform. I want to be able to select a specific portion of text within this textbox and format it like a rich text- for example, embolden it, add a bullet point etc. I am ...
0
votes
0
answers
72
views
how to prevent delayed wheel scrolling in a RichTextBox
When you scroll using the mouse wheel inside a RichTextBox the scrolling continues for a little while after you stop turning the wheel.
I want it to stop as soon as the wheel stops turning instead.
...
1
vote
1
answer
141
views
How do I color specific text in a RichTextBox?
So I was making a textbox and I thought that it would be cool if when the user types certain words, they'd get highlighted.
I made a function using a RichTextBox, but it colors, half the text it is ...
0
votes
0
answers
70
views
Using VBA to populate richtext field in browser
I am using the following code to paste text into a HTML document form. It works with normal text boxes but not with a rich text box.
IE.document.getelementId("ct100_ct138...T2").Value = &...
0
votes
1
answer
265
views
Asp.net ajaxToolkit:HtmlEditorExtender rich text editor won't send the whole message
I have an asp.net project and what I want to do is to make a textarea a rich text editor and for this I am using ajaxToolkit:HtmlEditorExtender. The problem is that when I enter some text in the ...
0
votes
1
answer
927
views
Extract RTF String from RichTextBox in C# .Net6.0 WPF [closed]
I am struggeling to get the RTF Text out of my RichTextBox. I am using C# .Net6.0, WPF.
I need to get the RTF String from the RichTextBox and store it in a variable. This Variable is in a class that ...
0
votes
1
answer
1k
views
How to display richtext data in reactjs or how to convert richtext in reactjs?
After fetching richtext editor's data from backend with reactJs the text display with HTML tag inside my div.
fetched data was such as:
const richText = '<p>Hello<strong> World</strong&...
0
votes
0
answers
151
views
How can I convert an html response by an api request to a normal text inside a RichTextBox in C# Windows forms Application
Please Help! I am trying to develop a sticky-notes application that has the capability of Bionic-Reading. I have used an api from rapidapi to implement it. The problem I'm encountering is that I can't ...
1
vote
1
answer
115
views
Select whole paragraph in a RichTextBox based on the current Caret position
I have a RichTextBox with Multiline set to true. It can contain multiple values, some of which are too long and get stretched into multiple lines but are treated as one line in RTB.
I'm trying to ...
0
votes
0
answers
151
views
Excel VBA: Store and retrieve content of a richtextbox in an userform
I made an userform to fill a table in Excel. Then I thought, instead of a normal textbox I could use a richtextbox for the "little extra".
But somehow I can't find a way to retrieve the RTF ...
-1
votes
2
answers
191
views
How to implement RichTextBox or Avalonedit with RuleLine (muted lines) in WPF
I wanna implement an editor that requires drawing RuleLines(Muted lins?) per line like the ones in the image below.
I'm going to use RichTextBox or AvalonEdit.
Can you help me creating this pattern?
...
0
votes
1
answer
48
views
WPF RichTextBox with clickable UNC path
I'd like to know how to insert a clickable UNC path into my RichTextBox - like this:
file://c:\Test
A hyperlink is working, but it didn't find the way with UNC.
Thank you,
K.
I had a project using ...
0
votes
0
answers
87
views
Use button to scroll down Richtextbox 4 lines
I have a RichTextBox in vb.net which shows data from a .txt file using the "ReadAllText" methode.
As this program is running on a device with a touchscreen, i want to use "big", ...
2
votes
0
answers
269
views
MouseWheel event in a RichTextBox
private void richTextBox1_MouseWheel(object sender, MouseEventArgs e)
{
if(richTextBox1.Focused)
{
}
}
I am using Windows forms RichTextbox, and my question is how do I make ...
2
votes
2
answers
2k
views
Rich text in TextField and getting RenderParagraph
I understand the TextField is primarily for plain text, but I have seen it is possible to display richly formatted text inside. I am a beginner with Flutter though and don't quite understand what is ...
1
vote
1
answer
89
views
I need to get cursor position of the end of a WPF .NET 6 RichTextBox in order to select and change the font of each appended line
In my application, I have a simple window with a read-only RichTextBox. I'm using WPF, .NET 6. The purpose of the Window is simply to display formatted information for the pluggable files used by the ...
0
votes
1
answer
100
views
How to detect richtextbox's "scroll up" event
Im using a timer to append text into richtextbox and automatically scroll to bottom:
private Timer timer = new Timer();
public Form1()
{
InitializeComponent();
timer.Tick += AutoAppendText;
...