LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use a LabVIEW tab constant?

Hello LabVIEW gurus,

 

The LabVIEW version in use: 2013 SP1

My OS: Win 7

 

When I use a tab constant, it only moves one space. Why is that? I would expect to see 5-6 white spaces

 

Any pointers will be appreciated greatly.

 

Thank you.

Download All
0 Kudos
Message 1 of 4
(4,297 Views)

Yes this is normal.  Have a tab be 10 pixels (or whatever) is defined by the program you are using.  I'm guessing you want a table, or a multicolumn listbox where you can provide a 2D array of rows and columns, more like Excel.  You can right click the string indicator and show slash codes and you'll see the tab is \t not \s for space so the tab is there it is just how you want to represent it.

0 Kudos
Message 2 of 4
(4,280 Views)

For string controls.  Yes.

 

A tab constant is actually a single character.  LabVIEW strings more or less show exactly what it is which is occupying the space of a single ASCII character, but it is non-printable, so it looks like a space.

 

When you use a tab in something like Microsoft Word, or even Notepad, it applies special significance to that tab character and will show it as taking up 4 or 5 or whatever spaces if is setup for.  Actually, for most apps, a tab doesn't mean any specific number of spaces, but to move the next piece of text to a specific column number (like what the tab key did on manual typewriters back in the day.)

 

If you need the tab to mean something special, then using a string control or indicator is the wrong thing for you.

 

 

 

 

0 Kudos
Message 3 of 4
(4,278 Views)

You should look at this idea and the comments and then vote for it if you still want this - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Render-tab-character-in-string-control/idi-p/1689076

 

In practice, I expect the most practical solution is either to use something like a table (if this is really column-based data) or trying to use a .NET control which renders tabs as columns. I'm guessing the rich text control does this, but I don't know, since I never needed this functionality enough to actually do something about.


___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(4,226 Views)