From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible bug in Row to Point method for Listbox

I have found that if you click and drag a row in a listbox (I only tried with a system single column listbox) the Point to Row does not always return the row that is selected.  This issue only seems to crop up when the very bottom pixel of the row is selected.

 

I captured a video of this behavior.  The first 23 seconds of the video is me trying to select the right spot and can largely be ignored.  The selection made at 24 seconds shows the difference in the selected row and the row returned by the Point to Row method.  I do it again at about 36 seconds.

 

I have no idea if this is caused by some display setting I have on my PC or an off by one error somewhere in the method, or some other fluke thing.

 

I'm trying to maintain a separate array with the same order as in the listbox, so it is imperative I know which row is actually being dragged.  The workaround I'm using is to simply use the value of the listbox instead of the row returned by Point to Row.

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 1 of 5
(2,600 Views)

It would be nice if you attached that code and clarified the LabVIEW version.

 

Between your sig line and the FP background color I'd guess some flavor of 2012 (OS, SP, patch# and bitness are all unknown)  Help us help you Tim!


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(2,572 Views)

It is LabVIEW 12.0f3 (32 bit) on Windows 7 64bit.  I attempted to attach the .vi and got shot down, and forgot to come back.  Apparently zipping it up doesn't work for me either.

 

I have changed the extension to vit. 

 

Forgot about snippets!

Point to Row bug.png

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 3 of 5
(2,563 Views)

I think you have your "work" and "workaround" reveresed.  What is the problem using the value of the listbox?

0 Kudos
Message 4 of 5
(2,554 Views)

The problem is I thought to use Row to Point first.

 

 

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 5 of 5
(2,540 Views)