To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example allows the user to write values to a listbox programmatically without generating a new control. The values are stored in the Array object associated with the listbox and can be reset to blank using the same method for initialization.
Description
A listbox can be used to store information in a 2D spreadsheet format and act as an input to other functions that want to modify or parse a large amount of information. This program takes advantage of the array object used to define the items in the listbox. At the start of execution, a 500x500 array constant with a value stored in the cell at row 500 column 500 is passed in to the array object of the listbox. The array has to have a value in that cell in order to initialize all the cells in the 500x500 space, which allows them to be editable during runtime. After the initialization step, the code enters a loop that waits for button press events. In the "Update" event case, the array object is accessed using the row and column user input information and a user defined value is stored there. In the "Clear" case the array object gets reinitialized to the same state as in the beginning.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
Additional Information or References
Front Panel
Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
It appears that this only works for column <4 and row <5. Is this a bug or am I missing something? Any ideas? Thanks!