NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Trusted Enthusiast
Darren
Posts: 2,870

Darren's Weekly Nugget 10/11/2010

Cool LabVIEW 2010 Features Part IX: Visible Display Style on Strings

 

Here we have another great Idea Exchange idea that made it into LabVIEW 2010:

 

stringformat.png

 

You can right-click any string constant, control, or indicator and choose Visible Items > Display Style.  That will display the little radix (just like with numerics) that indicates whether the string is displaying in Normal (n), '\' Codes (\), Password (p), or Hex (x) display. 

 

The front panel illustration above shows my favorite use case for this feature...I will often right-click on a string control or constant and choose '\' Codes, just to see if that string contains any whitespace characters that I can't see in normal display.  With the Display Style option, I can very quickly click the radix to switch back and forth between display styles to check this scenario.

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Trusted Enthusiast
tbob
Posts: 4,089
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

If you create a string indicator on the front panel by selecting String Indicator from the String palette, you do not have the Display Style option under Visible Items.  However, if you create a string indicator from the block diagram by right clicking on a string control or string constant, then selecting Create - indicator, then you do have the Display Style option.  Is this an oversight?

 

If you create a string indicator on the front panel (no Display Style option available), the right click and select Change to Control, you still don't have the Display Style option.

 

At least that is the way it all works on my computer.  Can someone else confirm?

 

- tbob

Inventor of the WORM Global
Proven Zealot
johnsold
Posts: 9,998
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

[ Edited ]

tbob,

 

It works that way on my Mac, too.

 

Display properties does not list Display Style on either one.

 

Lynn

Member
tstahl
Posts: 32
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

I can duplicate that as well.  Putting a string control on the front panel will show the option Visible Items->Display Style, but an indicator will not.  Changing an indicator to a control will not add the option.  Changing a control to an indicator keeps the option.

 

Tim

 

Knight of NI
altenbach
Posts: 27,086
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

 


tbob wrote:

Can someone else confirm?


yes, there seem to be some lose ends. The "system string" and "classic strings" don't seem to have it either. :smileysad:

 


LabVIEW Champion . Do more with less code and in less time .

Active Participant
LabBEAN
Posts: 377
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

[ Edited ]

The Modern string control is the only control that has the Display Style option.  The System, Classic, and Simple string controls do not currently support it (not sure how NI could edit the behavior of a System control since it adapts to the look of the OS).  If you are getting the Display Style option when creating string controls from diagram constants, maybe you have your "Control Style for New VIs" set to "Modern"?

 

Tools » Options » Front Panel » Control Style for New VIs

Proven Zealot
johnsold
Posts: 9,998
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

I could understand it the System style did not include the option, because I have never seen anything like it in other applications.  However, it should be documented if it is not available.

 

Also,  I created a property node for the String indicator I dropped on the FP.  I set DisplayFormatVisibility to True.  This generates error 1054 with this explanation:

 

 

Error 1054 occurred at Property Node (arg 1) in Untitled 1
Possible reason(s):
LabVIEW:  The specified object was not found.
Property Name: Display Format Visible?

Error 1054 occurred at Property Node (arg 1) in Untitled 1
Possible reason(s):LabVIEW:  The specified object was not found.Property Name: Display Format Visible?

 

 

Lynn

Knight of NI
altenbach
Posts: 27,086
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

[ Edited ]

 


LabBEAN wrote:

The System, Classic, and Simple string controls do not currently support it (don't see how a System control could do this).


The system numeric supports the "radix" display option, so why would a system string be any different? The display format could be shown very similarly.

 


LabVIEW Champion . Do more with less code and in less time .

Active Participant
LabBEAN
Posts: 377
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

 


 

altenbach wrote:

The system numeric supports the "radix" display option, so why would a system string be any different?


 

 

Is this ability not built into the System numeric by the OS?  Maybe someone who's used the System numeric in another language could weigh in...

Trusted Enthusiast
tbob
Posts: 4,089
0 Kudos

Re: Darren's Weekly Nugget 10/11/2010

This is definitely a feature that is very valuable.  I've been burned before by unseen spaces, and display set to hex when I assumed it was normal.  Having the style shown would be a big help.

 

I would like to see all the loose ends fixed.  Darrin, can you please submit a CAR?

 

- tbob

Inventor of the WORM Global