Guys,
I have a RichTextBox control on my form. The control is setup in such a way that it will wrap to the next line after 32 lines of text are input. The problem I'm having is I want to be able to retreive an array of strings representing the lines in my control. I know there is a Lines property attached to the RichTextBox, but I am experiencing 2 issues with it:
1) I ONLY want an array of strings showing the lines that are visible on the screen only. Right now the Lines array returns every single line in the RichTextBox. I only want the lines visible on the screen returned.
2) The Lines property is not giving me a true representation of my lines. It counts a "line" as a line of text ended by a carriage return or \n. So in other words, if I type 64 characters and none of them are a carriage return, then it should return 2 lines (because there are 32 characters per line). Instead, it doesn't return any lines until I hit enter. Even then, it only returns 1 line, not 2. Its acting more like a Paragraph property, if there was such a thing.
Anyone know a way around these 2 issues?I am using C# btw