ni.com is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

Example Code

String Limit using XControl Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This XControl is useful for limiting the number of characters a user can type into a string control.

Description
This XControl uses code written in two sub-vis to limit the number of characters that can be entered into the control.  The number of characters can be changed at run-time through the "String Length" property.  This XControl also comes with three other properties: BG Color, Text Color, and Font. Included is an example of how the XControl may be used. 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

  1. Choose a string length.
  2. Run the VI and user only can type the certain length of number of characters.

 

Additional Information or References
VI Block Diagram

 1.png

 

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

 

Regards
Prabhakant Patil

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Prabhakant_Patil
Member
Member
on

STRING LIMIT.JPG

Regards
Prabhakant Patil
Prabhakant_Patil
Member
Member
on

Any suggestions ????

Regards
Prabhakant Patil
GKE
Member
Member
on

useful xcontrol !

Would be nice to remove forbidden characters in string (e.g \t\s\r\n)

These characters could be defined in "forbid chr's" array like "string length".

syrpimp
Member
Member
on

very precise



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley