listbox unwanted scrolling

on serveral apps, i am getting unwanted scrolling to the top of the list box.
it occurs when the list exceeds the number of visual rows. i scroll to the end of the list with the mouse, then when i click on any one of the bottom rows ( that are at a range above the the number of visual row, the listbox will scroll to the top of the list.
i am not using lisbox.scrollposition on any of the

please advise.

are you repopulating the listbox? or adding to it after it is initially displayed?
if so… store the ScrollPostion before you do either of those, and reset it again after… that might help

by re-population do you mean, am i clearing the list box via me.DeleteAllRow , then building another list. Yes i do this.

also what do you mean by “reset it again” ?

dim oldScroll as integer=lb.scrollpostion
..... add stuff back again

got it, i’ll try it, and get back.

yep, that did it.

thank you

At last, this appears for someone else !

I may not be a fool (not totally ?) after all !

For me, this appears when I scroll the ListBox using fingers on the TouchPad doing some research operations. Probably with a second window with a ListBox open (for comparisons) beside the other one.

Think you are searching something by a number or by a date, and click while the ListBox is scrolling on the searched Row and get a different one selected, usually some tens before (I think it was before).

I never was able to determine what’s wrong.

I do not had it recently, but only because I do not do that search sequences.

Xojo 2015r1 / El Capitan / IDE and Compiled.
I think I saw that behavior on more recent IDEs (in these IDEs, not compiled applications).