Listbox scrolling

I have a listbox that I don’t wish to scroll. I’ve turned off the vertical scrollbar. My problem is, when I click on the bottom item, up she scrolls, showing a blank row at the bottom. This also happens when keying down through it with the downarrow.

I can’t find a solution. Any ideas?

btw, I’m using Windows 10.

intercept the mousedown and return true
and do the same for KEYDOWN

Function KeyDown(Key As String)  as Boolean
  return true
End Function

Function MouseDown(x As Integer, y As Integer)  as Boolean
  return true
End Function

Okay, I kinda, sorta fixed it. I set the row height to one pixel more (from 18 to 19) and now it doesn’t do this.

But my interface is running out of pixels and adding 16 more (16 row listbox) is a bit problematic. So I wonder, is there a way to stop the scrolling with narrower rows?

Using System font, point 0.

a listbox will normally scroll if the height of its contents exceeds the height of the listbox itself

Yeah.

As for intercepting the mousedown and keydown events, I do need the mousedown to select a cell for editing.

Guess I’ll just set the listbox fontsize to 19 and squeeze some other things.

Thanks for the tips, Dave.

Find a rowheight that works, THEN figure out what fontsize to use.

It should be something along the lines of

you might have to futz with it a bit… .but thats the general idea

Good point. Thanks again.