From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

frame color

Solved!
Go to solution

Is there a way to use the ATTR_CELL_FRAME_COLOR attribute on a row of a table control, or on a set of cells within a table?  The help for the ATTR_CELL_FRAME_COLOR attribute does mention compatibility with table controls.  Yet, I don't seem to get anything when I try to apply.

 

Here's a mockup of what I'd like to achieve:

 

table row outline concept.png

0 Kudos
Message 1 of 3
(4,568 Views)
Solution
Accepted by topic author ElectroLund

Hello there, ElectroLund!

 

The atribute you mentioned, ATTR_CELL_FRAME_COLOR, only applies to a ring/combo box cell pull-down area:

http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/uiref/cviattrcellframecolor_column/

 

However, you can accomplish a similar effect by applying these two table cell attributes corresponding for each cell and neighbouring cell:

  1. Use ATTR_HORIZONTAL_GRID_COLOR to set the bottom border of the cell.
  2. Use ATTR_VERTICAL_GRID_COLOR to set the right border of the cell.

Note, that you also have to set ATTR_TABLE_MODE to VAL_GRID and enable ATTR_HORIZONTAL_GRID_VISIBLE and ATTR_VERTICAL_GRID_VISIBLE.

You can play around with these attributes in the Edit Table » Edit Cell dialog » Cell Appearance.

 

Unfortunately, you would have to compute each such custom "row highlight" using your own algorithm, as the CVI table control doesn't have the notion of a row highlight.

 

I hope this helps!

- Johannes

Message 2 of 3
(4,549 Views)

Thanks.  Yeah, that's quite labor intensive.  I love tables for how much data you can show.  But wow, are they laborious!

 

 

0 Kudos
Message 3 of 3
(4,545 Views)