Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

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.

Edited by lothos12345
Posted

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.

'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.

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...