multiline in textboxes
-
when adding data from a list box to a text box the data is add on after the other eg. (123456789) i would like to know if there is a way to make them appear one under another eg. 1 2 3 4 5 6
Hi, the magic value Environment.NewLine causes a string to span more than one line; use it at your leisure, every time you want to start a new line in a file, a textbox, etc. Like so: myTextBox.Text="1"+Environment.NewLine+(2).ToString(); BTW: some people use "\n" or '\n' ; on a Windows PC it would have a similar effect; but other systems may not like it that much. :)
Luc Pattyn
try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }
-
when adding data from a list box to a text box the data is add on after the other eg. (123456789) i would like to know if there is a way to make them appear one under another eg. 1 2 3 4 5 6
-
Better to use
Environment.NewLine
becuase it will return the correct value for the operating system in which you are running.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website