LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I highlight the first row in an empty listbox ?

I am trying to use listbox for results assessment, either by creating or opening a file. When I first load the front panel I want to see an empty listbox with the first row highlighted. Is this possible ? If it is would you tell me how this can be done?
0 Kudos
Message 1 of 5
(3,084 Views)
There must be an element in the list for it to be possible to highlight the first line, but it does not need to contain visible characters...

That means that if you write a space on row one and highlight it and set that as the default value of the control you are there...
0 Kudos
Message 2 of 5
(3,084 Views)
It doesn't even have to be a space. I use an empty string constant and a build array function on the diagram. The attachment shows how to do that and how to set it to highlight the first row using a local variable.
0 Kudos
Message 3 of 5
(3,084 Views)
I don't quite get you Dennis. The listbox is 2D array type, how could you assign a 1-D value to the Item Names ?

Let me explain the problem here. When I first load the front panel I want an empty listbox with first row highlighted. And let's the columns have the field info. I muxt be able to enter values to the first row and then move on to the next one. But, the problem here is the Items Names property must be pre-assigned with Static Number of Rows (don't have to worry about the columns as they are fields and known). If I am going to have a static Rows, lets' say 50, and I want to continue beyond 50, labview won't let me do this I guess. I am not sure what way to go about getting an answer to this problem. If you could hint me that would be nice.
0 Kudos
Message 4 of 5
(3,084 Views)
A listbox is a 1D array type. A multicolumn listbox is a 2D array type. See your other posting for an example with a multicolumn.
0 Kudos
Message 5 of 5
(3,084 Views)