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
  • 38,204
  • 73
  • 178
  • 253
Kornelije Petak
  • 9,172
  • 14
  • 67
  • 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
  • 142
  • 1
  • 6