lothos12345 Posted November 3, 2005 Posted November 3, 2005 (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 November 3, 2005 by lothos12345 Quote
Leaders snarfblam Posted November 3, 2005 Leaders Posted November 3, 2005 How is it not allowing you to? Is is throwing an exception? If so, what exception? Quote [sIGPIC]e[/sIGPIC]
Nate Bross Posted November 4, 2005 Posted November 4, 2005 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. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.