LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String control line limit

When entering text into a string control with word wrapping disabled there appears to be a limit of 3245 characters.  Beyond this the string will wrap to the next line.  What limits this?  Is there a way to change the limit?

0 Kudos
Message 1 of 9
(3,260 Views)

Lets see an example: 

is the H Scroll visable?

 

are there word breaks?

 

what font, font size?

 

Monitor resolution?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 9
(3,256 Views)

H Scroll bars are visable

The wrap will happen at the word breaks if there are any, but if there are none it will wrap at about 3245 characters (limit depends on character uses)

15pt Application Font, resolution 1280x1024

I've had LabVIEW crash twice now trying to play with this limit.

 

To duplicate this create a new vi and add a string control.  Turn of 'Enable Wrapping'. Stretch the string control to see multiple lines.  Turn on the horizontal scroll bar.  Add text to the control by just holding a key down until it wraps to the next line.  Using the number 11111111111111.... I got 2667 characters before it wraps.  Using just the dot '.' I got 5334.

0 Kudos
Message 3 of 9
(3,241 Views)

Here is an example showing the line automaticly wrapping when "Enable Wrapping" is turn off.

0 Kudos
Message 4 of 9
(3,198 Views)

Thanks,

"Enable Wrapping" is a bit missleading  it should be read as "Set preferance to Wrap at word boundaries but wrap at max width anyhow"

 

Playing with Ctrl+= and Ctrl+- (Font size hot-keys) shows that the wrap is limited to a specific number of pixels.

 

The ODD thing is LabVIEW crashes if you insert a word boundary in the long wrapped string (LabVIEW 2013 x32 on Win7x64)  That was not anticipated and something shoud be investigated here.

 

To Reproduce: Caution LabVIEW is likely to crash! ( LabVIEW will crash if this bug can be confirmed)

  • Enable NI Error Reporting
  • Close every other VI and project (You don't want to lose your workSmiley Wink)
  • Open the String control line char limit.vi that Jeff Kittle attached.
  • Add a space about 20 chars into the control with all those 1's
  • Send the error report while LabVIEW crashes

"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 9
(3,188 Views)

So that leaves me hoping there is a way to change the "max width".  I got notepad++ to over 20 million "W" chars without wrapping.  I ended up crashing it trying dots "."

I have text files that are 400k chars wide and get messy when viewed in a string control.

 

0 Kudos
Message 6 of 9
(3,181 Views)

@jeff.kittle wrote:

I have text files that are 400k chars wide and get messy when viewed in a string control.

 


OK Jeff I have to ask this one cuz' I'm getting slivers in my fingers from stratching my wooden head.

 

Where do you find users that have the time, intellect and drive to navigate, comprehend and effectivly use the data in a string control that has lines of nearly half a million characters? 400k Chars is a good sized novella or short story.  I think therefore, that such a piece of data is not intended for user interaction and does not belong on the front panel of a GUI and any subvi that needs a copy of that data could find some other method (DVR) to reduce the huge memory footprint you will get at 800kB PER LINE (controls must copy the data on the wire).


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 9
(3,175 Views)

I mis-read the count from notepadd++.  The line length is actually around 40k chars.  The file is 400k chars.  These are legacy ASCII data files that I am parsing.  Only one line is this long because it contains long test names.  The string control is not normaly used by the user to read the data, but the unexpected word wraps are not desired.

0 Kudos
Message 8 of 9
(3,171 Views)

Well if the user ain't using it... its not an issue.  A cosmetic indeosynchrosy perhaps, but not a deal breaker.


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 9
(3,166 Views)