09-05-2012 11:15 AM - edited 09-05-2012 11:16 AM
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?
09-05-2012 12:38 PM
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,
09-05-2012 01:38 PM
09-05-2012 03:00 PM
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.
09-05-2012 03:48 PM
@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.
09-05-2012 04:43 PM - edited 09-05-2012 04:45 PM
@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.
09-05-2012 04:50 PM
BAM! I knew I had seen this before somewhere. Look into this LAVA thread
09-05-2012 05:14 PM
Also, I had a brain fart, it becomes an array when you choose to allow "multiselect"
09-06-2012 09:33 AM
But the array alone doesn't enable the use of symbols in the second column. Or at least for me.
09-06-2012 10:13 AM - edited 09-06-2012 10:15 AM
@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.