Showing results for 
Search instead for 
Did you mean: 

Change the selected data text background color in a table

Go to solution



I'm trying to use a table as part of my GUI.  A user can select an item and it will return the row value, please the the attached file.


The problem I'm having is that when a user clicks a cell, the background text becomes white.  In the meantime I am trying to highlight the entire row in one color.  It doesn't look great.


Does anyone know if this property can be set ?

0 Kudos
Message 1 of 10
Try the System Table.
0 Kudos
Message 2 of 10

Hi Darin,


Thanks for the suggestion, unfortunately it makes no difference.




0 Kudos
Message 3 of 10

i tried the same in LV2009 but i didnt see that the Table cell becomes "white"....

Message Edited by Guruthilak on 02-23-2010 04:53 PM
Guru (CLA)
0 Kudos
Message 4 of 10

Use a "Mouse Down?" Filter event and discard same.



0 Kudos
Message 5 of 10
Try using a listbox, with selection mode->highlight entire row.  The selection behavior of listboxes is a lot nicer than for tables.  You can access the strings in the listbox using the Item Names property.
0 Kudos
Message 6 of 10

hi Guruthilak& Ben,


It's strange to hear you don't see this problem in LabVIEW 2009, as I am using LabVIEW 2009 Q3 and I see the problem.


I use mouse down also in the event structure.  I am using a state machine for the VI.  It shouldn't effect operation but I have the row formatting in a separate frame.  See attached.


If anyone could post sample working code, it'd be great help.


0 Kudos
Message 7 of 10

Hi blawsin,


I thought of using a listbox but it doesn't have mutliple columns similar to a table.  I'm importing data from an SQL databse and it's important to have it separated correctly.




0 Kudos
Message 8 of 10
Accepted by topic author SeanJ

"Mouse down ? " Filter Event and discard same. By discarding the event you cancel the cell being highlighted.



0 Kudos
Message 9 of 10

well you could try the multi-column listbox.  it's right next to it.


the main difference is how you want to access the row strings.  In a table you could use a mousedown? filtering event like ben says, and use an invoke node to return the row where the click was.  Use this row to index the table's array data, which is the value of the control.


In a multicolumn listbox, the control's value is the row (or rows) selected, and you get/set the strings through property nodes.  It's probably a toss up between the two in terms of coding effort, but I like how the listbox control handles selections with simpler event cases.  The listbox definitely wins if you want to return multiple rows. You'll probably want to change the selection mode to "highlight entire row" 

Message 10 of 10