LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table.ctl, cell background colour

Solved!
Go to solution

Hallo,

 

I have created a Table ctl typedef with 60 rows for viewing some data. I am calling this typedef in another Vi and have used the CellBGColor property to grey out some cells marked with X. I checked with the highlight execution, and the greying is done only upto 39 rows, before it moves to the next column. Any ideas why this might be happening? Does the table.ctl have some sort of limit? Any help will be appreciated 🙂

 

Cheers,

mulayvus

0 Kudos
Message 1 of 8
(3,063 Views)

I'm willing to bet that you are telling it to only set the BG color on rows up to 39.  Code will "typically" only do what you tell it to do.  Maybe your instructions aren't clear?  Smiley Wink

 

Can you post your code so we can help you? 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 8
(3,061 Views)

Hi aputman,

actually should not be so as I am also telling it to count the rows... Anyways, you can find the logic in the attachment.

 

Cheers,

mulayvus

0 Kudos
Message 3 of 8
(3,019 Views)
Solution
Accepted by mulayvus

Hi mulayvus,

 

did you read the help for those "NumCols" and "NumRows" properties?

Maybe you only read the visible rows/columns!?

 

The size of your array is defined by the string array displayed in the table!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 8
(3,015 Views)
Solution
Accepted by mulayvus

Hi,

 

The property node that you are using outputs the number of rows/columns which are visible on the front panel.

Are you displaying all 60 rows at one time or do you using the scrollbar to move the rows?

Rhys

Message 5 of 8
(3,013 Views)

Hi,

I am using a scrollbar. So how does this work? I do not want to resize the table. I tried to run the VI with the second half of the table visible, but the counting begins with the first row.

 

Regards,

mulayvus

0 Kudos
Message 6 of 8
(3,004 Views)

Hi mulayvus,

 

as said before: get the size of the 2D string array you are wiring to the table!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(3,001 Views)

Hi,

 

since I had to grey out the cells only once, I resized the table, ran the program and resized it back again.. Worked! Thanx for all your inputs! 🙂

 

Cheers,

mulayvus

0 Kudos
Message 8 of 8
(2,994 Views)