Vb Count of lines multi-text box
-
Hi Wahyu,
Thank you for the posting.
Excuse me that the requirement is not pretty clear, could you provide a clear example of your requirement?
0 -
So I have a sentence in multiline. with a width of 50mm and a variable length - depending on the count of words.
can you help me to build a script that can count the number of lines in the multiline / or better if it can display the length of the multiline text object.
0 -
I still don't understand what you are trying to accomplish,
Do you have a format with a sample data field?
try taking a snapshot of the layout with a sample of data in the parragraph
and filled with the lines you wish to display.
for now as far as i know you will need to insert a vbCrLf (Carriage Return)
at the end of each line and count how many Carriage return code are found in there.
A picture is worth a 1000 words.
We will be waiting for your screen sample.
Regards
Adem Flores Sr.
0 -
I also asked the BT service support for this question, but I got no answer. Now I calculate the width of each character first and then determine where to wrap the line to calculate the number of lines.
Please forgive me for my poor English!
0 -
Hi bruse and adam
thankyou for the response. I don't know how to add an image to a comment, so I'll provide a link to the sample text.so is there a vb script to calculate the height of the textbox or the number of lines of sentences in the textbox?
0 -
Hi KT
Keep in mind that fonts are variable width Like the "W" is wider than "I" and because of this the amount of characters that will fit in each paragraph line
will be different,
I sometimes use a mono-spaced font like Courier New in which each character has the same space, that will give you a constant character width per character and should be able to fit the same amount of characters per line.
Hope this helps you achieve your goal.
Regards,
0
Please sign in to leave a comment.
Comments
6 comments