Click to See Complete Forum and Search --> : [RESOLVED] "Cycling" through a richtextbox


Pale
July 24th, 2008, 01:51 AM
Alright, i have an application in which the user inputs information into a rich textbox separated by enter spaces. Lets say i want to display all of that information once at a time in a message box.

Eg. Foo
Foobar
Foobr

i want to do a messagebox.show each one of those individually except on a mass scale like 100. On a single button click.

maybe use a method so i could do something like "messagebox.show(showinformation());"

How could i go about doing this?

Thank you,

Pale.

Shuja Ali
July 24th, 2008, 02:21 AM
Use String.Split() method to split the text in Richtextbox.

Pale
July 24th, 2008, 12:17 PM
Use String.Split() method to split the text in Richtextbox.

How do i make that do an enter space between the text?

eclipsed4utoo
July 24th, 2008, 01:28 PM
String.Split() will split a string on a specific character. The character int value for a carriage return is 13.

DeepT
July 24th, 2008, 01:36 PM
How about:

MessageBox.Show(MyString.Replace("\n", "\r\n"));