How can I get a vertical scrollbar in my ListBox?

后端 未结 7 1940
执念已碎
执念已碎 2020-12-13 16:55

In the example below I have a ListBox with dozens of font names in it.

I would have thought it would automatically have a vertical scrollbar on it so that you can se

7条回答
  •  星月不相逢
    2020-12-13 17:37

    In my case the number of items in the ListBox is dynamic so I didn't want to use the Height property. I used MaxHeight instead and it works nicely. The scrollbar appears when it fills the space I've allocated for it.

提交回复
热议问题