06-17-2015 03:32 PM
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.
06-17-2015 03:39 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-17-2015 03:40 PM
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.
06-18-2015 01:18 AM
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.