06-13-2012 02:50 PM - edited 06-13-2012 02:52 PM
Hello all,
I am a relatively new Labview developer, so bear with me.
I am attempting to create something of a text editor as a plugin for a software product we use to control machines. I want to have a little "status bar" at the bottom of my string control that says what line/column the cursor is at in the string control.
When I use "Update Value While Typing" it causes the text display to become slow and lag behind what the user is doing, which is needless to say very annoying.
So, I was wondering if there was some other way I could periodically update the value of the string control without using "Update Value While Typing."
06-13-2012 03:07 PM
You can write to the string control with a local variable. Your control must obviously be in a loop. Is there any kind of delay in the loop? If not try putting a wait(mS) node in and wire something like 100mS to it.
06-14-2012 08:39 AM - edited 06-14-2012 08:41 AM
After having made some changes, I no longer have the inital problem I posted.
I am now using "Update Value while Typing" set to True. For the most part it types fine. Except when I hold down a key (or really mash the buttons but I'm not to worried about that). If I hold down a key (say a letter or Backspace) and then let go after a few seconds, it will continue to place or delete characters long after I let go of the key.
I had thought because I had some controls stacked on each other (most are hidden and only made visible when applicable) that may have been the cause, but I just moved all my controls so there are no controls on top of each other and I still have this problem.
Does anyone know of any typical things that might cause this problem? My application uses a producer/consumer design with a queue, but all my program does for the most part is make controls visible and invisible and waits for button presses before performing what I would think are trivial tasks, such as reading or writing a text file. I am really out of ideas for what would cause this slow typing to occur with my string control.
Thanks in advance.
06-14-2012 09:41 AM
06-14-2012 10:56 AM
06-14-2012 03:40 PM
I figured out what I was doing wrong and fixed it.
Thank you to those who replied.
06-14-2012 03:44 PM
07-02-2012 07:16 AM
I only kind of half fixed this.
It can still type a little slowly if you really mash the keys, but typing normally but quickly doesn't really cause an issue.
The problem is with needing to use Update Value While Typing and having to use a Key Down? event. All the events cause it to get slow. But it works fine enough for what I need it for I suppose.
Without using Key Down? events, I am not really sure how else to create my hotkey functionality for this VI to be run in a subpanel. I need to be able to throw out the key press, and I only know how to do that with Key Down? events..
07-02-2012 07:52 AM
relate to this new query: http://forums.ni.com/t5/LabVIEW/Syntax-Coloring-in-String-Control/td-p/2050678
Or rather, the new query appears to be a descendant of this.