LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Richtextbox append text

Greetings fellow LabVIEWers.

 

The simple VI attached functions per my requirements with a simple textbox.  I desire to use a richtextbox instead to provide more text features.  This VI (sub VI) is called from a higher level VI only when there is some captured text to append to the display.  Every time you run it, you will see how the textbox appends text, but the richtextbox prints the text input followed by clearing the display on VI execution completion.  I am unable to find a .NET or regular property node parameter to affect this behavior.  Aside from using a separate wasteful circular variable in this application, I'm out of ideas.  What am I missing? The attached VI is version 2020

 

Thanks!

Tom

0 Kudos
Message 1 of 5
(1,032 Views)

Can you save your  example in an earlier version?  Say 2017 or 2012 to insure that everybody can open it.

 

Tom (on V2019 because it is to much of a pain to update 20 or 30 machines every year)

0 Kudos
Message 2 of 5
(1,027 Views)

Sure!  Here is one in V15.

 

I feel your pain!  I have a pile of Win XP boxes running 2011 that I'm upgrading in addition to trying to develop new APPs for Win10.  FUN! - Not 😅

 

Ill post older if anyone needs.....

0 Kudos
Message 3 of 5
(1,020 Views)

Hi Tom,

 


@TomMc7 wrote:
Every time you run it, you will see how the textbox appends text, but the richtextbox prints the text input followed by clearing the display on VI execution completion.  I am unable to find a .NET or regular property node parameter to affect this behavior.  Aside from using a separate wasteful circular variable in this application, I'm out of ideas.  What am I missing?

You don't miss anything, this is just the way the RichTextBox (RTB) works!

 

You are using a method of your string control to append some text: this is the same as using a "circular variable" aka a feedback node to keep a history of previous data.

But with the RTB you just use a function to display the latest data: the RTB does not retain old data nor did you use any special method to tell it to retain data! (I don't know/care if the RTB even provides such a method.)

 

Conclusion: when you want to use the RTB then you need to collect all the data you want to display in the RTB…

 

It's quite simple:

Btw. .NET indicators only show data as long as the VI is in running state…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(980 Views)

Many thanks for looking into this.  I guess the feedback node is reasonable.  I'm sad to here that .Net indicators have to be running though to maintain the last written data.  I abandoned that approach because I have up to 16 different sub VI windows open for this application.  I ran into problems with interacting (scrolling, copying) from them while they were running.  Also selecting windows was sluggish.  I understand that is a seprerate topic and I'm sure there are ways to remedy that, but the string text boxes behave so efficiently in a non running mode especially on slower machines.

Hopefully ill have time to get back to/dig into this "tool app" after my main project.

 

Thanks again!

 

Tom

0 Kudos
Message 5 of 5
(959 Views)