Example Code

Sort a Multi-Column Listbox by Clicking on the Column Header 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

Download All

Overview

This VI shows how to sort a multicolumn listbox when you click a column header.

 

Description

The main VI contains a multicolumn listbox. Clicking any header sorts the listbox by that column. The VI reorders all other columns to maintain row integrity. The top-level VI in the LLB passes a control reference for the listbox to a subVI that programmatically sorts the listbox.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

1. Run the VI.
2. Click a column header once to sort that column in ascending order.
3. Click the header again to sort the column in descending order.

 

Additional Information or Resources

 

 2012.png

 

 

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

 

 

Product Support Engineer
National Instruments

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

Comments
francois-normandin
Member Member
Member
on

Great utility. It gave me some ideas and I took the liberty to make modifications to your code.

It's posted here: http://decibel.ni.com/content/docs/DOC-2306

cheers,

GCentral ChampionCLA