LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tabs display incorrectly in string control

I posted this question before without a satisfactory answer(activex/dotnet is not stable enough) but cannot find the post so I'm posting it again. 

 

I'm posting text information to the labview string control, but the data is not aligning properly. Is there a setting I can use so tabs will fill more than just a single space and allow text to line up properly?

0 Kudos
Message 1 of 12
(4,711 Views)

To the best of my knowlege, NO.

 

Some work-arounds?

 

Hmmmm

 

Use the format into streadsheet string and use the tab as the delimter and display in a table with transparent cell lines?

 

Write code to insert the proper number of spaces to accomplish the foramtting.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 12
(4,701 Views)

Steve Block wrote:

I posted this question before without a satisfactory answer(activex/dotnet is not stable enough) but cannot find the post so I'm posting it again.


It was here. I just clicked on your name to view the posts you had done. Was the second one on the list.

 

I would agree that the the table is your best bet. That's what I've done in the past.

 

Out of curiosity, what was unstable with the ActiveX/.NET solution? What did you actually use?

Message 3 of 12
(4,684 Views)

You can format your string using the Format Into String node.  I've made this to show how different length data in one column doesn't mess up the allignment of the other columns.  This won't work unless you use monospace fonts (I used Courier).

 

stringFormat.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 4 of 12
(4,672 Views)

I love it when I'm wrong!

 

Just learned something new today thanks to you Jim.

 

Ben

 

PS You have been tagged

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 12
(4,669 Views)

"Out of curiosity, what was unstable with the ActiveX/.NET solution? What did you actually use? Kudos! Thanks! Solution? "

 

First, I cannot access the text the same way I can with a normal string control. This requires me to update all instances. Putting that inconvenience aside, when I place the RichTextBox control in a custom type, it comes up in different positions when instatiated.

0 Kudos
Message 6 of 12
(4,654 Views)
I've used Jim's approach in the past as well, but I never liked the magic numbering required for getting the columns lined up. And, if you try to save it to a spreadsheet file it's a bit cumbersome since you get all those spaces inserted to make things line up.
Message 7 of 12
(4,643 Views)

I'm having a similar issue.  I'm trying to display the output of an external binary file from within my LabVIEW program via a string indicator and tabs are not shown correctly so it looks like an absolute mess.

 

Untitled picture1.png

 

vs

 

Untitled picture2.png

 

Is there any new insight on the best approach for this problem since the last post?  Thanks you.

0 Kudos
Message 8 of 12
(4,272 Views)

Can you display it in a table or multicolumn listbox.  Either would require a bit of preprocessing, but if the fields are tab separated, the Spreadsheet String to Array function should do what you need.

 

Lynn

0 Kudos
Message 9 of 12
(4,262 Views)

Thanks for the reply.  There is other header/footer information in the output that does not conform to a table very well....

 

I also would like it if my Input File string control accepted "tabs" as input in case my users want to modify the source code before passing it to the executable for processing.

 

I think a .NET or ActiveX control may be my best bet for this.  Any recommendations?  I'd love to use Notepad++ but there doesn't appear to be any .NET or ActiveX hooks.

 

 

0 Kudos
Message 10 of 12
(4,258 Views)