From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

String XControl with Autocompletion Functionality

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

Description

Overview

This string control has a programmable list of keywords that it searches through to autocomplete as you type. It also can programmatically split up keyword searches using various delimiters such as spaces and commas.

 

Description

I submitted this example a while ago to the proper Developer Zone examples, but I thought it would be a good one to resubmit to this online community. I really hope someone gets some good use out of this.Take a look at the example. It's basicly just a string control, but you can use property nodes and invoke nodes to change a list of keywords that the control attempts to search for and autocomplete as you type. As with other autocompletion fields, the autocompleted portion is highlighted so you can continue typing if it isn't what you want. You can also hit tab to accept the autocompletion and move on. Enjoy!

 

For more information on XControls, please see Creating New Front Panel Objects with LabVIEW XControls.

 

Steps to Implement or Execute Code

  1. Download and unzip files
  2. Open the project file
  3. Run Autocomplete Demo.vi

 

For more information, see the Readme file included in the folder.

 

Requirements:

Requires LabVIEW 8.0 or higher. Users without the LabVIEW Professional Development System can use this example, but will not be able to modify it.

Autocomplete Screenshot.PNG

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

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