07-14-2018 12:47 PM
Dear All,
I want to color the strings in the multicollumn listbox. I do it in a loop, looping through every listbox row and using "CellFontColor" property
The problem is that the process is pretty slow. I have few thousand rows in the list, and the list recolors in this way in tens of seconds. The colors of the rows are to be changed for example when a user clicks on a row, and when I click on the row #1000 I wait for 10 s until is has been recolored.
Is there any more proper (faster) way to dynamically recolor the multicolumn listbox?
Thank you.
Solved! Go to Solution.
07-14-2018 01:12 PM - edited 07-14-2018 01:12 PM
Can you show your actual VI that is taking 10's of seconds?
Do you need to recolor every row, or just the ones that changed?
If you execute a property node for defer panel updates before and after the code that recolors (true before, false after) LabVIEW doesn't schedule all the screen refreshes and it should execute much more quickly.
07-14-2018 02:56 PM - edited 07-14-2018 02:57 PM
@P.C. wrote:
The colors of the rows are to be changed for example when a user clicks on a row, and when I click on the row #1000 I wait for 10 s until is has been recolored.
Do you only need to re-color the clicked row or all of the rows? It is probably important to only touch cells that actually change colors.
And yes, try to defer the panel updates while coloring. Please attach a simplified version of your code.
(EDIT: Ah, Ravens already said all that :D)
07-16-2018 10:45 AM
Thank you, sirs,
Defering updates function seems to resolve my problem. I just was not aware of it before