Jump to content

Conditional Formatting of Table control


jkittle

Recommended Posts

I have a table showing data and I change the background color based on user input limits. This is easily done in Excel. In LabVIEW I am looping through the table data (2-D) and setting the 'ActiveCell' and setting the 'CellBGColor'. This is brutally slow. Is there a faster way?

post-28128-0-18753500-1354055808.png

Link to comment

You should try deferring front panel updates. You need to clear errors or leave the error in terminal unwired when it comes time to stop deferring the update, otherwise in case of an error you will end up deferring indefinitely.

post-26690-0-42942000-1354059648.png

Shameless plug alert:

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Make-Defer-Updates-an-Object-Property-as-well-as-a-Panel/idi-p/1292100

Edited by Darin
Link to comment

I agree to use defer front panel updates, but if you are dealing with coloring alot of cells (more than say 40) I would recommend trying to do something like this which uses a "Virtual MultiColumn Listbox"

This technique only shows a few rows of data, and the rest is shown as the scrollbar changes. This is a good candidate for an XControl.

  • Like 1
Link to comment

Both the replies above are definitely true and recommended if you're seeing slow updates.

Unfortunately though, even observing these practices can lead to updates which are still unacceptably slow. If you have decent sized data sets consider maintaining the list virtually and only displaying the subset of data that's needed. If you search the forum for a thread named Virtual Multicolumn Listbox (or something similar) you ought to be able to find a post I made a while ago demonstrating as much.

Hah, Hooovahh beat me to it.

Link to comment

Hah, Hooovahh beat me to it.

I really do love that technique by the way, and I've been trying to combine your stuff with this:

I have made alot of progress, but it seems like XControls are never done. I really should post what I've come up with so someone else can have a go at it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.