In an application I'm loading a RTF value from a database into a richtextbox.
After setting the RTF property of the richtextbox control I notice that this value is different than the database value
Well it is something like this
richtextbox.rtf = 'databasevalue'
but after this statement I notice that the richtextbox.rtf value is not equal to 'databasevalue'
Here is my rtf value (from...
User Profile
Collapse
-
RTF problem after setting rtf value
-
Already found a way to resolve this:
Public Shared Sub TrimRichTextBox (ByRef RichTextControl As RichTextBox, _
Optional ByVal LeadingSpaces As Boolean = True, _
Optional ByVal TrailingSpaces As Boolean = True)
Try
If LeadingSpaces Then
Do While RichTextControl .Text.StartsWit h("... -
RichtextBox trim problem
Hello,
In my code I use the following command:
me.richtextbox1 .text = me.richtextbox1 .text.trim
By doing this I lose al my text formatting, it seems that by setting the text property of a richtextbox you lose al the formatting.
Any idea how I can remove the leading and trailing spaces in a text without losing the rtf formatting?
Thanks in advance.
David
No activity results to display
Show More
Leave a comment: