02-22-2010 12:26 PM
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 ?
Solved! Go to Solution.
02-22-2010 12:34 PM
02-23-2010 03:11 AM
Hi Darin,
Thanks for the suggestion, unfortunately it makes no difference.
Rgds,
Sean
02-23-2010 05:15 AM - edited 02-23-2010 05:23 AM
i tried the same in LV2009 but i didnt see that the Table cell becomes "white"....
02-23-2010 07:44 AM
Use a "Mouse Down?" Filter event and discard same.
Ben
02-23-2010 08:20 AM
02-24-2010 05:56 AM
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.
02-24-2010 05:58 AM
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
02-24-2010 07:01 AM
"Mouse down ? " Filter Event and discard same. By discarding the event you cancel the cell being highlighted.
Ben
02-24-2010 08:59 AM
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"