UI Interest Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Selectable Items Listbox (xControl)

Summary

This xcontrols is a system listbox with selectable items option. Most of the labview users may require this control for most of their projects.

This control allows user to dynamically update items names, Select required List items from the control. The code is completely open source.

List of Methods

Invert Selection - Invert the current selection list

Select All - Select all the list items

Select None - Unselect all the list items

List of Properties

Selected Index[] (Read\Write) - Dynamically Set or get the selected items by Index[]

Selected Items (Read) - Get the selected item(s) names from the control

Item Names[] (Read\Write) - Update or read all the Item names in the list box

Hide Sysmbols (Read\Write) - Show or hide item symbols (True=Hide and False = Show) Show is default

How to reuse the xControl?

Copy the "Selectable Items ListBox xControl" folder to your custom project.

Drag and drop the "ListBox xControl.xctrl" on your VI

Use required property and method of the control as usual.

Selectable Listbox.JPG

              The above picture shows the test vi frontpanel of "Selectable items listbox" xcontrol in runmode

How to test the xControl?

Download and extract the zip file. Then open the project in LabVIEW 2011 or latter.

Open and run the "Test ListBox VI.vi"

Then enjoy the rest......

Comments
Hooovahh
Proven Zealot Proven Zealot
Proven Zealot
on

Very neat.  Why did you choose to determine the row clicked, based on pixels, instead of using the built in Point to Row invoke node?  This method also returns if the mouse is in the symbol as well.  Also what is up with the value of this Xcontrol?  It is always an empty array of string when you read it.  I think it would be nice if it returned either the Selected Items, or Selected Index.  And I don't think I like the way that the checkboxes get checked, but the row still gets highlighted, and only that row.  I think either showing all the selected rows being highlighted, or none would be more to what normal Windows programs do.

EDIT: I also noticed you have an extra method called Select which lets you "Check All" or non, but you already have methods for doing this.

Contributors