0

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?

Sergio Tapia
  • 40,006
  • 76
  • 183
  • 254
Kornelije Petak
  • 9,412
  • 15
  • 68
  • 96

2 Answers2

0

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)

Community
  • 1
  • 1
Roger Deep
  • 162
  • 1
  • 6