开发者

Getting rid of extra space in a scrolled ListBox

开发者 https://www.devze.com 2023-03-18 15:03 出处:网络
I use a owner drawn ListBox with a big ItemHeight, what works fine so far. My problem is that there is some blank space at the end of the list, when not all items can be displayed.

I use a owner drawn ListBox with a big ItemHeight, what works fine so far. My problem is that there is some blank space at the end of the list, when not all items can be displayed.

Is there any way i can get rid of this space?

I tried setting the IntegralHeight property to true, but this will shrink the ListBox leaving me with the same amount of free control space.

This is开发者_Go百科 what it looks like:

Getting rid of extra space in a scrolled ListBox


As you noted in your question, setting IntegralHeight to True will solve the problem-- somewhat. It will shrink or grow to the next logical size based on the ItemHeight. So if the ListBox shrinks, try resizing the height to the next size.

Based on your image, it looks like you need to just make it "slightly" larger. If you don't have the space to make it one unit larger, then you are out of luck with the ListBox.

Getting rid of extra space in a scrolled ListBox

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号