09-03-2009 05:04 AM
Hello,
Is there a possibility to set colors of multicolumn listbox's cell's texts programmatically?
09-03-2009 05:22 AM
there is a property that changes the active cell color.
but I don't know about all of them
09-03-2009 07:33 AM
Yes.
First set the active cell to the cell you want to manipulate (read the help on this terminal, -2,-2 selects the whole list box ...)
Then use
CellBG to set the background color of the cell
or
CellFontColor to set the font of the text.
Have fun!
Ben
09-03-2009 08:50 AM
Here's an example of how to find a certain cell value and color it. Remember to initialize all cells as white before doing this, or the cells that get colored will stay that way even when the data changes.
09-04-2009 09:02 AM
Thank you very much for help. I tried and it worked.
Taron
07-14-2010 01:31 PM
How do you initialize the color of the cells as white?
07-14-2010 01:42 PM
@Fonzie1104 wrote:
How do you initialize the color of the cells as white?
Read what I wrote in post # 3 and use white as the color.
Ben
03-17-2011 07:50 AM
For everyone's edification...
Changing the background color of an individual cell is extremely slow. It takes me about 15 seconds to set the background color of each cell in a particular column in a 1000x6 multicolumn listbox. Changing the entire row to the specified color is orders of magnitude faster, even though the same number of calls is being made to the property nodes. Changing the text color is about twice as fast as changing the background color, but still unacceptably slow. And yes, panel updates are being deferred. This problem exists in LV2009 through 2010SP1. A CAR (#188518) has been filed. Unfortunately, this severely impacts the GUI I had intended on using for a new application.
03-17-2011 08:02 AM
@wired wrote:
For everyone's edification...
Changing the background color of an individual cell is extremely slow. It takes me about 15 seconds to set the background color of each cell in a particular column in a 1000x6 multicolumn listbox. Changing the entire row to the specified color is orders of magnitude faster, even though the same number of calls is being made to the property nodes. Changing the text color is about twice as fast as changing the background color, but still unacceptably slow. And yes, panel updates are being deferred. This problem exists in LV2009 through 2010SP1. A CAR (#188518) has been filed. Unfortunately, this severely impacts the GUI I had intended on using for a new application.
How about
defer, hide the list box, do the update, show the list box, undefer?
Ben
03-17-2011 08:11 AM
Just tried it - that makes no difference in performance, not that I would expect it to. If panel updates are being deferred, I don't see what benefit hiding the control would be?