By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,579 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,579 IT Pros & Developers. It's quick & easy.

Hard CR/LF wordwrap in textbox ??

P: n/a
Hi all,

Is it possible to force a multiline textbox to insert a hard cr/lf when
wordwrapping ??

What I would like is to get a string array from the textbox representing
exactly how the text appears in the box.

ie if I type in "hello there everyone" and the textbox wraps it over 2
lines, I want to get an array containing the 2 strings..

"hello there"
"everyone"

Can this be done with a standard textbox ?? Or is there a function that can
take a string and wrap it to a specified length and return an array ??

thanks in advance
Steve

Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Steve,

Strange, this is the normal behaviour in my opinion from a multiline
textbox.

A singleline sees it as one line while with a multiline it is usable with
lines and even processable as that.

http://msdn.microsoft.com/library/de...ilinetopic.asp

I hope this helps

Cor
"Steve" <@> schreef in bericht
news:42**********************@news.optusnet.com.au ...
Hi all,

Is it possible to force a multiline textbox to insert a hard cr/lf when
wordwrapping ??

What I would like is to get a string array from the textbox representing
exactly how the text appears in the box.

ie if I type in "hello there everyone" and the textbox wraps it over 2
lines, I want to get an array containing the 2 strings..

"hello there"
"everyone"

Can this be done with a standard textbox ?? Or is there a function that
can take a string and wrap it to a specified length and return an array ??

thanks in advance
Steve

Nov 21 '05 #2

P: n/a

"Cor Ligthert" <no************@planet.nl> wrote in message
news:Oc*************@TK2MSFTNGP14.phx.gbl...
Steve,

Strange, this is the normal behaviour in my opinion from a multiline
textbox.

A singleline sees it as one line while with a multiline it is usable with
lines and even processable as that.

http://msdn.microsoft.com/library/de...ilinetopic.asp


Hi Cor,

the textbox.lines property only splits the text into individual strings when
there are cr/lf characters typed by the user (ie they hit enter).

When the textbox wraps a long line onto second line, it does not add cr/lf
chars. When you check textbox.lines there is only one long string in the
array.
The wrapping is just done as it is displayed.

I would like to get a string array that represents exactly what the text
looks like in the box, after it has been wrapped.

thanks
Steve
Nov 21 '05 #3

P: n/a
Steve,

I don't know this in a simple way.

Cor
Nov 21 '05 #4

P: n/a
"Steve" <@> schrieb:
ie if I type in "hello there everyone" and the textbox wraps it over 2
lines, I want to get an array containing the 2 strings..


VB6 code (must be converted in order to be used in VB.NET):

<URL:http://www.activevb.de/tipps/vb6tipps/tipp0098.html>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5

P: n/a

"Cor Ligthert" <no************@planet.nl> wrote in message
news:e9**************@TK2MSFTNGP15.phx.gbl...
Steve,

I don't know this in a simple way.


thanks anyway Cor

Steve
Nov 21 '05 #6

P: n/a

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
"Steve" <@> schrieb:
ie if I type in "hello there everyone" and the textbox wraps it over 2
lines, I want to get an array containing the 2 strings..


VB6 code (must be converted in order to be used in VB.NET):

<URL:http://www.activevb.de/tipps/vb6tipps/tipp0098.html>


thanks Herfried. I will look into this

Steve
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.