RTF issue

lothos12345

Well-known member
Joined
May 2, 2002
Messages
294
Location
Texas
RTF string addition

I need to add RichText to a string for as long as the method is in a loop. However, it does not allow me to do so my code is as


dim x as string

x = x & rtftext

It will allow me to add to the string in the first instance however, thats it, it will not allow me to add any additional richtext. This works as expected with regular text just not richtext. Any ideals or solutions would be greatly appreciated.
 
Last edited by a moderator:
How is it not allowing you to? Is is throwing an exception? If so, what exception?
 
I think you are talking about the actual RichText data. In which case you would need to put your new text into the curly braces in the RichText data. You could also just add the data to the rtb using the built in methods.
Code:
untested
rtb.SelStart = rtb.TextLength
rtb.SelLength = 0
rtb.SelColor = Color.Pink
rtb.SelFontSize = 44
rtb.SelText = rtb.Text & NewTextFromThisTimeThroughTheLoop
I say that because I assume you are trying to maintain the formatting of the data you are looping through.
 

Similar threads

P
Replies
0
Views
102
Paulywog0667_Laptop
P
G
Replies
0
Views
150
guyinkalamazoo3
G
Back
Top