LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Listbox behaves in unexpected manner

The multi column listbox does not behave as I would expect.  This casues problems for the users of my application.  Here are the steps to reproduce:
 
Create a system multi-column listbox. Fill in several rows with some data.
Set the properties Active Cell and Edit Position to a row in the middle of the ones you populated.

Set the value to that same row.
Set the key focus to true.
Create a simple while loop to keep the VI running after all these setting are applied.
Run the VI. The row you set should be selected.
Use the up/down arrow keys to move to another row more than 2 rows away.
Stop the VI
Run the VI again.
Use the arrow keys to move the selection again. Instead of moving relative to the programmatically selected row that is highlighted, it will jump to the row that was (up/down) from the row you moved to right before you last stopped the VI.

Why does it do this? Why does it remember the last selection you navigated to? How can I override this so the selection I set programmatically is the one it will move relative to when the use uses the arrow keys?

Is this a bug?
-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 1 of 18
(5,074 Views)
Looks like a bug.
Labview 8.2 has the same behavior...
0 Kudos
Message 2 of 18
(5,062 Views)
Here is a workaround.  Use an event structure to handle the up and down button presses instead.  I don't see that you did anything wrong in what you posted.  It appears the control doesn't update some internal value for the arrow keys unless the user clicks on a row.  Even the Value (Signaling) property doesn't address the issue.
0 Kudos
Message 3 of 18
(5,059 Views)
If you go the event route make sure to capture the Key Repeat? event as well as Key Down? (otherwise it'll move back to it's wrong postion if you hold down the arrow key). You'll probably want to set the top left cell, to keep the current selection in view as well.
0 Kudos
Message 4 of 18
(5,053 Views)
diverting to new question
 
we need to generate a double click event .
when user presses single button it should generate a dobule click event in block diagram. ,
eg. when we click a button in front panel , it should generate a double click event in the same way as we double click on an express vi to see properties or load data file . (sim arbt signal)
thanks
Hader
0 Kudos
Message 5 of 18
(5,047 Views)
Don't divert the thread to a new question.Smiley MadSmiley Wink
Your actual question is already located in your new thread here.
0 Kudos
Message 6 of 18
(5,026 Views)

This was reported to R&D (# 4GUA4BLJ) for further investigation.  For now, the workaround that Matthew suggested using events should work the way you intended. Thanks for the feedback!

Regards,

Craig D
Applications Engineer
National Instruments

Message 7 of 18
(4,965 Views)

Hi,

 

Any update on the progress of this, I am having the same issue in LabVIEW 2009 SP1, and would prefer not to use the keyboard up/down events if possible.

 

Brett

0 Kudos
Message 8 of 18
(4,028 Views)

I can confirm it still exists in LabVIEW 2011.  I don't see it on the known issues list.  Has this fallen through the cracks?

0 Kudos
Message 9 of 18
(4,025 Views)

I'm still using the workaournd in my code.  Sure would be nice for them to fix or explain this one.

-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 10 of 18
(4,019 Views)