Valhalla Legends Forums Archive | .NET Platform | Loops

AuthorMessageTime
VeBee
How do i use a loop to count how many lines there are in a richtextbox?
August 6, 2006, 12:39 AM
Topaz
Don't use a loop. You can probably store the text in the richtextbox in a string and split it by newline.
August 6, 2006, 1:07 AM
K
If you look at the members of a RichTextBox, you might notice that it has a "Lines" member.

If you further investigate this "Lines" member, you would notice that it is a string array, which means that you can use the "Length" property.

[code]
length = myRTB.Lines.Length
[/code]

August 6, 2006, 1:23 AM
VeBee
thanks guys! but my dad just helped me do it.
now i can continue on with the easy part.
August 6, 2006, 1:52 AM
Myndfyr
[quote author=VeBee link=topic=15500.msg156569#msg156569 date=1154829141]
now i can continue on with the easy part.
[/quote]
That *was* the easy part.
August 6, 2006, 7:26 PM

Search