I just filed a bug report about WebListBox.ScrollTo, after trying to scroll to 5, and getting nothing.
It appears the WebListBox scrolls until the passed row is at the bottom of the control, instead of at the top, as it happens in the Desktop control and most every grid I know of.
I see the “by design” thing and the report closed in advance.
However, I think this is very unintuitive and unpractical. If I want to scroll to 5, then I have to count the visible rows, and add that. And even then, it is not precise enough to really scroll to 5 on top.
puzzled, puzzled, puzzled :s
When you called ScrollTo, was the row already visible?
I have attached a project to the bug report.
It contains a WebListBox with 12 visible rows. I tried ScrollTo(10) and nothing happened. In Desktop, row 10 would have been scrolled to the top of the ListBox.
I finally understood ScrollTo in fact places the row at the bottom of the WebListBox. So if I do ScrollTo(14) indeed row 14 appears at the bottom of the control.
That is terribly unintuitive IMO.
Now to get row 10 on top of the visible rows, I have to do ScrollTo(20). That is not even quite logic, since I would have expected 20 to be at the very bottom of visible rows, and in fact it is 21.
The seems to be the case in the IDE itself when debugging it places the active row at the very bottom of the window, which is unintuitive (should be at the top or middle) and unhelpful (since I want to see the next lines more than the lines just executed).