LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

text box persistence

I am using  a single line text box to display a string received from an instrument. Everything works fine in the debug mode. However, when I made the executable and loaded it on another computer, the received message flashes very quickly (to fast to actually read). Everything else works fine. How can I make the text box display more persistent?

 

Jim Rogers

0 Kudos
Message 1 of 2
(2,567 Views)

A textbox, like any other control, actually IS a persistent method to display data: whatever you place in it will stay there until you explicitly clear or substitute it. Your problem must lie somewhere else in the program that operates in an unwanted manner.

I would double check whether your instrument returns a CR+LF to end messages and whether you have trimmed it away before actually displaying the message: such a terminator will cause the single-line textbox to shift away text from the visible part of it. You could also try displaying two lines on the control: if my hipothesis is correct you'll see the message in the first line.

 

BTW, remember that using SetCtrlVal on a textbox actually append new data to the old one: yìif you happen to retrieve textbox content you'll get a long string with all messages store in the time. Use ResetTextBox to replace existing content with new data.



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 2 of 2
(2,563 Views)