Word wrapping

One limitation of the Command Line Interface control, is that it could only display as long strings of text as it’s width in characters at a time. The following text would be cut off just after “I like the way”:

Dim S As New System.Text.StringBuilder()
S.Append("Just gonna stand there and watch me burn ")
S.Append("That's all right because I like the way it hurts ")
S.Append("Just gonna stand there and hear me cry ")
S.Append("That's all right because I love the way you lie ")
S.Append("I love the way you lie")
Cli1.WriteLines(S.ToString())

Now, the WriteLines function also takes a boolean, and when True, the text will be devided into several lines, without breaking any words.

Cli1.WriteLines(True, S.ToString())

The CLI Control can be downloaded from here.

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll:

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!

Comments

Important information: If you have not commented before, your comment will be reviewed before it is published. This means that you will not see it immediately, but I have received it. This is not because I want to filter comments, but because I want to prevent spam and advertising.

Leave a Reply

Your email address will not be published. Required fields are marked *