LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multicolumn Listbox cell "focus box" in LV 8.20

I am trying to create a program that allows me to move between three separate multicolumn listboxes with the right/left arrow keys, as well as navigate the listboxes up and down with the up/down arrow keys.

 

The problem is that after moving left and right, using the property node for multicolumn listbox ‘Value’ (as well as the ‘KeyFocus’ property) does not change the fuzzy, dashed-line "focus box" (for lack of a better term).  So a move left or right will initially highlight the correct cell, moving and up and down will use that "focus box" as its starting point.

 

As it is somewhat difficult to explain, I have attached an example of what I am trying to do (in LV 8.20).

 

For example: if you scroll to the second row from the bottom of Listbox 1, then to the right to Listbox 2, then up to the top row of Listbox 2, then back left to Listbox 1, pressing down will bring you to the bottom row of Listbox 1, instead of the second row from the top.

 

Is there some property node I am missing to change this “focus box” position?  I can't seem to find it.  I had a similar (but more sloppy) program working under LV 7.1 without this problem.

 

Thanks,

Adam

0 Kudos
Message 1 of 13
(4,590 Views)
I guess I didn't attach the files correctly.  I'll attach them tomorrow morning.
0 Kudos
Message 2 of 13
(4,573 Views)
.zip of the two VIs is attached.
0 Kudos
Message 3 of 13
(4,559 Views)
Hi Adam,

Could you please attach the prorgam that you had working for LabVIEW 7.1. I would like to have a look at this. Thanks!

Steven C
0 Kudos
Message 4 of 13
(4,519 Views)
Just to make sure it wasn't my move from a local variable to a property node didn't cause the problem, I re-worked my 7.1 program to be nearly identical to the 8.2 program.
 
The 7.1 program does not have the same problem.
 
I remember reading something about how multicolumn listboxes were changed in 8.2 (or 😎 to be more like the standard Windows API.
 
*edit: typo

Message Edited by Adam Krajewski on 11-29-2006 11:51 AM

0 Kudos
Message 5 of 13
(4,511 Views)
Hi Adam,

Thank you for this. Do you remember where you saw the notes outlining the changes were made to multicolum listboxes in LV 8 or 8.2 (was it in a discussion forum, knowledge base article, readme file). I would like to review these to get some addtional insight into the details of what exactly changed to determine how to get the previous behavior in this new vi. Thank you.

Steven C
0 Kudos
Message 6 of 13
(4,474 Views)
I can't remember where I saw the comments about changes to the Multicolumn Listbox. 
 
I found it searching through NI's site somewhere.  I know it wasn't in the discussion forums, but I don't recall any other specific details.  Sorry, I wish I could find it again myself.
0 Kudos
Message 7 of 13
(4,459 Views)
Hi Adam,

Here is a vi with similar behavior to what you have been seeing. I have included a second vi that shows the workaround to this particular behavior that occurs in LV 8.0 and 8.2. You should be able to use this workaround in your vi as well. I hope this helps.

Best regards,

Steven C
Download All
Message 8 of 13
(4,444 Views)

Thanks a lot for the effort, but, from what I can tell, it doesn't work correctly.

With the Discard? property on the Key Down Filter Event ("Key Down?" not "Key Down", the Notify Event) set to FALSE, the "Home" key executes its default functionailty after executing the code in the Event.  The "Home" key normally brings you to the top of the multicolumn listbox (with the 'fuzzy focus box'), so after code in the "Home" case executes, the "Home" key also executes as it normally would.

Try changing the "Home" case to operate with either "End" or "PageDown" to see what I mean or put a wait in the "Home" case and watch the 'fuzzy focus box' lag behind the selection highlight.

0 Kudos
Message 9 of 13
(4,430 Views)
Hi Adam,

I tried some addtional tests on your vi and I notice that when you move the selection box back to a column group that you had previously been in (via the side arrow keys) and left click on the box, the dotted arrow moves to this point. Perhaps as a workaround, you could simulate the mouse click on these coordinates to get the dotted box around the selection you need. Here is a discussion forum post that talks about how to simulate a mouse click.

http://forums.ni.com/ni/board/message?board.id=170&message.id=87509&view=by_date_ascending&page=2

I hope that this helps.

Best regards,

Steven
0 Kudos
Message 10 of 13
(4,412 Views)