LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Programmatically Insert Rows into a Multicolumn Listbox

Solved!
Go to solution

How can I programmatically insert a new row into a Multicolumn Listbox?  Is there a way to access the function that is executed when I right-click on a Multicolumn Listbox and select 'Insert Row Before'?  This function keeps the cell formating (Font Color, etc) in sync after inserting the new row.

 

I have implemented this using the 'Item Names' and 'CellFontColor' property nodes, but this takes way too long when manipulating a ~80 rows x ~80 columns Multicolumn Listbox.  Right-Clicking and selecting 'Insert Row Before' is instantaneous.

 

 

Thanks,

 

 

Chris

0 Kudos
Message 1 of 4
(4,448 Views)
Solution
Accepted by chardee

Hi Chris,

 

use DeferPanelUpdate when manipulating the ListBox...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(4,447 Views)

Just to add to what GerdW already stated.  Set the DeferPanelUpdate to TRUE, manipulate the listbox, and then set it to FALSE.  What this does is it tells the user interface thread to not draw updates to the front panel while you are making a lot of changes.  This will speed up operations, sometimes quite considerably.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(4,437 Views)

GerdW,

 

Thanks for the tip.  Inserting a new row and keeping the existing cell formatting in sync is now instaneous after using the DeferPanelUpdate property.

 

It still would be nice, and a lot easier, if LabVIEW provided access to the Right-Click Insert Row method.

0 Kudos
Message 4 of 4
(4,428 Views)