Ahhh, interesting problem. I have an explanation for you. If you look at the function help for DeleteTextBoxLine it says "Removes the line of text at the specified index". For every line (except the last line of the text box) this includes the text on that line and a carriage return (\r). The problem is for the last line to be removed completely, you have to remove the text on that line, and the carriage return on the PREVIOUS line. For example, if my text box contains:
Hello
World,
CVI
Rocks!
there is a /r after "Hello", "World,", and "CVI", so deleting the text on any of those lines also deletes a /r which creates a new line. But deleting the last line, remove "Rocks!", but no /r so the number of lines stays the same and the last line is blank.
If yo
u absolutely have to delete lines from the absolute bottom, the easiest way to code it would probably be to get the value of the next to last line, delete the next to last line, then set the value of the last line to the value retrieved from step 1.
Best Regards,
Chris Matthews
Measurement Studio Support Manager