LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Message 1 of 14
(8,121 Views)

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
0 Kudos
Message 2 of 14
(8,084 Views)

tbob,

 

It works that way on my Mac, too.

 

Display properties does not list Display Style on either one.

 

Lynn

0 Kudos
Message 3 of 14
(8,074 Views)

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

 

0 Kudos
Message 4 of 14
(8,063 Views)

 


@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. 😞

 

0 Kudos
Message 5 of 14
(8,060 Views)

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


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 6 of 14
(8,045 Views)

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

0 Kudos
Message 7 of 14
(8,038 Views)

 


@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.

 

0 Kudos
Message 8 of 14
(8,036 Views)

 


 

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...


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 9 of 14
(8,025 Views)

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
0 Kudos
Message 10 of 14
(8,004 Views)