LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Textbox text scrolls outside visible area

I am reading ASCII data from the comport and displaying it in a textbox. It scrolls and even the most recent response is not visible. How do I correct this?
0 Kudos
Message 1 of 5
(3,409 Views)

I am attaching a simple project that writes lines to a textbox and always displays the last line written: it may be helpful for your needs.

Roberto



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 5
(3,401 Views)

An easier solution is to use SetCtrlVal (panel, control, string);  to add lines at the end of the text box. This causes the box to automatically scroll to display the last line.

JR

0 Kudos
Message 3 of 5
(3,398 Views)


@jr_2005 wrote:

An easier solution is to use SetCtrlVal (panel, control, string);  to add lines at the end of the text box. This causes the box to automatically scroll to display the last line.

JR




Right and simpler Smiley Wink, but don't forget in this case to terminate the string with a "\n" to separate lines, otherwise the text will be added on the same line.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 5
(3,396 Views)

...Unless the text box is set to 'Word' Wrap Mode Smiley Tongue

JR

0 Kudos
Message 5 of 5
(3,391 Views)