Question

If a listbox has many items, is there a way (programatically) to check if an item is visible on screen.

For example, the listbox has 100 items, but only first 24 are shown of the screen, is there a way to check if a specific (say list[75]) is currently displayed or one should scroll to see it?

OTHER TIPS

Check Calculating number of visible items in ListBox and look for my post below.

I've seen to many complex answers that are not correct.

Short answer: (listBox1.Height/ listBox1.ItemHeight)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top