LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change the selected data text background color in a table

Solved!
Go to solution

Hi,

 

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
(4,793 Views)
Try the System Table.
0 Kudos
Message 2 of 10
(4,785 Views)

Hi Darin,

 

Thanks for the suggestion, unfortunately it makes no difference.

 

Rgds,

Sean

0 Kudos
Message 3 of 10
(4,764 Views)

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
Regards
Guru (CLA)
0 Kudos
Message 4 of 10
(4,757 Views)

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

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 10
(4,749 Views)
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.
-Barrett
CLD
0 Kudos
Message 6 of 10
(4,742 Views)

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
(4,709 Views)

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.

 

Rgds,

Sean

0 Kudos
Message 8 of 10
(4,708 Views)
Solution
Accepted by topic author SeanJ

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

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 10
(4,701 Views)

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" 

-Barrett
CLD
Message 10 of 10
(4,695 Views)