InsertTextBoxLine Removes New Lines in the Text With LabWindows™/CVI 2020

Updated Jul 25, 2023

Reported In

Software

  • LabWindows/CVI

Issue Details

The InsertTextBoxLine() function removes a (random) newline in the requested text when printing a string to a textbox control. If you were to write 1 2 3 on newlines – 2 and 3 would be on the same lane and it would skip that "/n". In previous versions of LabWindows/CVI, it behaves as expected.

Solution

This behavior has been reported as a bug in LabWindows/CVI 2020. There are two workarounds that you can use in order to get the expected output text in a text box control:
  1. Add additional "\n" as needed to replicate the behavior in previous versions of LabWindows/CVI.
  2. Use the "SetCtrlVal(panel,control, text)" instead of the InsertTextBoxLine  method.