views:

53

answers:

5

i need to write a list of url in a textbox in a window apps but when i write it he was mixed like http://google.comhttp://google.comhttp://google.comi

but i want to show clearly i already used
"\n\r" method but he not worked are any sollution for it

+1  A: 

Try to use "\n\r" for line break.

Anton
no i try it but he not worked
4thpage
try also set property of TextBox Multiline = "true"
Anton
replace your html <br /> with the control sequence "\n\r" as anton suggests.
Steve Robillard
thanks but i already try it it's not worked
4thpage
i thing you should be clear it is \n\r
4thpage
A: 

You need set the multiline property of your Textbox to true. Then use Environment.NewLine to do a cr/lf (this is equivalent to /r/n)

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.aspx

David Neale
A: 

You will need to use a multiline textbox for this. Place Environment.NewLine after each url and it should work.

BTW why are you not using ListBox or ListView?

danish
A: 

When working with string or such, try using StringBuilder, it works in my app.

private void FillTextBox()
    {
        StringBuilder st = new StringBuilder();
        st.AppendLine("http://www.google.be");
        st.AppendLine("http://www.google.be");
        st.AppendLine("http://www.google.be");
        st.AppendLine("http://www.google.be");
        st.AppendLine("http://www.google.be");
        st.AppendLine("http://www.google.be");
        st.AppendLine("http://www.google.be");
        textBox1.Text = st.ToString();
    }
djerry
Not the cleanest way, should have put in a for-loop :)
djerry
i can't use it because i write it using looping when i try it i see a last link only in a text box
4thpage
then try textBox1.Text = textBox1.Text + st.ToString();
djerry
A: 

yes First you need to set the multiline property to True and better to use Environment.NewLine to set the new line.

Or in stringBuilber.AppedLine("")

Hope this will helpo you :)

anishmarokey