LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using symbols in a multicolumn listbox

Run the above code. As I have pointed out only the control labeled 'MC Listbox' adds symbols to the second column. I added a triplicate porperty node and changed the Active Cell to be Row -2 and Column 2. Again it only adds symbols to the third column for control 'MC Listbox' not 'Multicolumn Listbox'.

 

As someone pointed out, only the control 'MC Listbox' allows symbols to be applied to columns beyone the first. Why?

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 11 of 21
(3,155 Views)

Hi Doug,

 

To answer your question on why the MC Listbox allows for extra symbols, it appears to be that someone has created a custom control.  The LabVIEW built-in Multicolumn Listbox does not have this feature.  You may see the note located here: Adding Symbols to Listboxes and Tree Controls.  If you would like this functionality, feel free to use the control located within the example, as it appears to have the functionality you desire.

 

Regards, 

Daniel Dorroh
National Instruments
0 Kudos
Message 12 of 21
(3,141 Views)

Hi Daniel,

 

can you tell us how that special custom control was created? How to duplicate that behaviour?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 21
(3,132 Views)

What GerdW said.

 

I can (and did reuse the custom control) but I was curious what the secret was to applying symbols to columns other than column one.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 14 of 21
(3,126 Views)

@DougFerguson wrote:

What GerdW said.

 

I can (and did reuse the custom control) but I was curious what the secret was to applying symbols to columns other than column one.


Well, as I've already pointed out, a simple way to do this without creating a custom control, is to change the font for the column.

0 Kudos
Message 15 of 21
(3,118 Views)

@D-Cubed wrote:

Hi Doug,

 

To answer your question on why the MC Listbox allows for extra symbols, it appears to be that someone has created a custom control.  The LabVIEW built-in Multicolumn Listbox does not have this feature.  You may see the note located here: Adding Symbols to Listboxes and Tree Controls.  If you would like this functionality, feel free to use the control located within the example, as it appears to have the functionality you desire.

 

Regards, 


 

How is this a "custom" control in the traditional LabVIEW sense? If you customize the control and include it in your VI, don't you need to have the control file locally on your machine? I do not and it still loads it. Is this buried in VI.lib somewhere? I'm wondering if you can use a similar trick to that of a tree control to add symbols to children items.

0 Kudos
Message 16 of 21
(3,113 Views)

BAM! I knew I had seen this before somewhere. Look into this LAVA thread

0 Kudos
Message 17 of 21
(3,109 Views)

Also, I had a brain fart, it becomes an array when you choose to allow "multiselect"

0 Kudos
Message 18 of 21
(3,107 Views)

But the array alone doesn't enable the use of symbols in the second column. Or at least for me.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 19 of 21
(3,091 Views)

@DougFerguson wrote:

But the array alone doesn't enable the use of symbols in the second column. Or at least for me.


That's right, all the array means is that you have allowed the user to select multiple items in the listbox. I got excited for a minute and posted before thinking it all through. The fact that it's an array has nothing to do with the symbol functionality.

 

If you dig through that thread I linked to enough, you will see that the MC listbox is one that was used in the NI example finder, but is not the same as the one that ships with LabVIEW. Someone extracted it from the example finder. The way it works is you set the active cell to be on the column you want your symbols to be in, then you set the symbol array and it will set the symbols for that column.

 

So, conclusion -- That control is different than the MC listbox that ships with LabVIEW; it was extracted from the example finder which has the functionality for symbols in columns other than the first. In order to set symbols in the other columns, one has to set the active cell to (-2, column n) where n is the column number you want to put the symbols in. I believe this will not show up in your palette, but you could save it as a custom control, and put it in user.lib so that it will.

Message 20 of 21
(3,084 Views)