Example Code

Retrieve the Text Selected in a String Control

Code and Documents

Attachment

Overview
This short example demonstrates how to obtain the text which is selected by a user in a string control on a LabVIEW Front Panel.

 


Description
This short example demonstrates how to obtain the text which is selected by a user in a string control on a LabVIEW Front Panel. This program uses an event stucture and the Mouse Up event of the string control to update the Selection indicator after the user makes a selection.  To use the example, simply run the VI and select some text in the String Control.  The example should be compatible with LabVIEW 8.5 and later.

 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Unzip the attached folder to your computer
  2. Open the VI " Get String Control Selection 2012 NIVerified.vi"
  3. Run the program
  4. Select the string in the control with cursor

 

Additional Information or References
VI Block Diagram

 Block Diagram.PNG

 

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

 

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/

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