vbMarkO Posted January 26, 2009 Posted January 26, 2009 I know I know ... this sounds stupid ... But this RTB is about to drive me nuts I have contents of an array in the rtb and I need to clear whast in the rtb so I can update it with new content but what I am getting is this lets say I have 1 2 3 I have the above for example displayed in rtb when I update the rtb I get this 1 2 3 1 2 3 Its not clearing the other text before adding evn though I am telling it to Her is my code ' Why doesnt rtbDes.text = "" get it done??????? rtbDes.Text = "" For i As Integer = 0 To myPubAr.Count - 1 rtbDes.Text = rtbDes.Text & myPubAr(i) & "..........." & myLocAr(i) & vbCrLf Next I know this has got to be simple ... if I do this in lets say a listbox I can easily clear it an give it the update ... why not this stupid RTB? ALL help very much appreciated vbMarkO Quote Visual Basic 2008 Express Edition!
Administrators PlausiblyDamp Posted January 26, 2009 Administrators Posted January 26, 2009 Have you checked the contents of the arrays when the code executes? I can't see why it wouldn't clear the rtb - however if the array is being appended to then that could be the source of the problem. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
vbMarkO Posted January 26, 2009 Author Posted January 26, 2009 You pointed the way ... it was the array ... I needed to clear it first as when I was updating it was adding the info back into the array so the rtb was clearing as it should Thanx so very much THIS IS RESOLVED myPuAr.CLear() myLocAr.Clear() did the trick Thanx Quote Visual Basic 2008 Express Edition!
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.