CarNagE Posted August 12, 2003 Posted August 12, 2003 I'm working on a simple editor and tried to set the contents of my instance of a RichTextBox by using its Lines-property. According to the MSDN, it provides a set-modifier. I wondered when I tried myRichTextBox.Lines[0] = "bla"; and nothing happened to the contents of my RTFBox... Can anyone tell me, what I'm doing wrong? Quote
*Gurus* divil Posted August 12, 2003 *Gurus* Posted August 12, 2003 The array property as a whole is read/write, so you'd have to do something like this: string[] myarray = myRTB.Lines; myarray[0] = "blah"; myRTB.Lines = myarray; Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
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.