LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select seperate column in multicolumn list box

when i checked the above sample example you have posted, when there is more number of rows, the scroll bar will be coming while adding values but when we try to select them...the scroll bar is disabled. But for my applicaiton, there are more values having scroll bar enabled and i need to scroll throgh all my values and select or check mark the first item from the list. i have used point to row column event to get the column index selected , the cell position value is giving 0,0 index when scroll bar is selected...so which will be in the bounds...or it will give the row value that i have selected already.

suppose i have selected 4 row , it is giving 4,0

0 Kudos
Message 11 of 17
(1,678 Views)
I modified the original example to have 26 rows, plenty to have the scroll bar.  If you probe the inbounds, you will see it is false when you press down on the scrollbar.  The scrollbar is not considered in bounds (at least in LV 8.6.1f1).  You need to use this and skip the code.
Message Edited by Matthew Kelton on 02-11-2010 05:47 PM
0 Kudos
Message 12 of 17
(1,673 Views)
Thank you Matthew, it worked.
0 Kudos
Message 13 of 17
(1,651 Views)

Hello,

 

Thanks for this VI, I got what I was looking for since a longue time.

However, I still miss something:

How can I do to set back  the previous "selected cell" to its original color instead of the predefined color.

For example:

- Cell A Background color is "blue"

- Cell B Background color is "red"

- Cell C Background color is "white"

- The Background color of your VI set to yellow for example.

 

a) When I select Cell A, Background is set to yellow (which is normal)

b) Then when I leave cell A and select cell B, I would like Cell A to get back to "blue"

c) Same, if I leave Cell B and select cell C, I would like Cell B to get back to "red"

d)....

 

0 Kudos
Message 14 of 17
(1,033 Views)

A couple of options:

 

1.  Before you change the color of the cell, get the current color and store it.  Whenever the selection changes, restore the old cell color.  This will also require you to track the current cell selection so that you still no what it is when a new selection occurs.

 

2.  Store the entire table's cell colors and blindly recolor the whole table.  Not horrible for a small table.  You will want to defer Panel updates most likely, as it will run faster.

 

Matthew

 

0 Kudos
Message 15 of 17
(1,020 Views)

Good day to all!

I have a question, as I can do to move the selected cells with the keyboard (arrow up - arrow down)

or do this with "ok buttons"

 

 

Please!, I need help!, Thanks Smiley Sad

0 Kudos
Message 16 of 17
(921 Views)

@AlehTH wrote:

I have a question


Great that's what the forums are for, but to help with organization I suggest you start your own thread with your own question, providing as much detail and code as you have.  Your question has little to do with selecting columns in a listbox, or coloring them.

 

Be sure and read the When Posting a Question section, and the Things Not To Do.

0 Kudos
Message 17 of 17
(900 Views)