Link to home
Start Free TrialLog in
Avatar of chadmanvb
chadmanvb

asked on

missing line breaks in a form popup visual basic with a multiline textbox

I use a form as a pop.  I pass some test to display on the form.  If I use a label, it looks correct.  When I use a multiline textbox it strings all the text together without line breaks.  How can I fix this?  

Public Sub New(ByVal DisplayText As String)
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call


        strFormText = DisplayText

        TextBox1.Text = DisplayText
        Label1.Text = strFormText

       
         End Sub
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chadmanvb
chadmanvb

ASKER

It's output from a linux server.  I have the linux server run unix2dos command before it's passed to my application.  The display looks fine on the label for the popup, but does not work for the textbox.  I just thought they would work the same.  I was hopping to use a mutiline textbox so I could use a scroll bar if needed.
This did it:


 TextBox1.Text = DisplayText.Replace("\n", Environment.NewLine)

Any idea why?