printing 2nd page from textbox

handlewithbeer

Newcomer
Joined
Oct 7, 2003
Messages
15
Location
Vancouver, BC
I have a textbox with several order items in it. To determine the number of lines, I divided the height with the font size. Cool. Now, to get the total number of lines of text, I used a string array, set it to the textbox, and used stringArray.getUpperbound(0). Cooler.

now for the question. If the number of total lines of text (ie order items) is greater than the amount of lines the textbox can hold (ie what the user would see) how can I add the remaining lines of text to another array, and print that off. I know it sounds a bit confusing, but any help would be appreciated.

thanks,

H.W.B.
 
That is kinda working, but still a bit buggy. Take a look.

Visual Basic:
Dim lineCount As Integer
'number of lines in the textbox
        lineCount = (txtOrderItems.Height / myFont.Height) - 1
'firstArray initialized to hold the textBox contents
        Dim firstArray() As String

        firstArray = txtOrderItems.Lines

'if there are more lines past the bottom of the TextBox, get a cutoff point

        Dim breakOff As Integer = firstArray.GetUpperBound(0) - lineCount

'Now What? This is where I need assistance.
        Dim secondArray() As String
        secondArray = ??

OK, so you see the problem, and I'm just not sure how to copy, in laymens terms, from starting point X all the way to the end
 
Last edited:
Back
Top