ListView auto size to show all items

后端 未结 2 1733
我寻月下人不归
我寻月下人不归 2021-01-22 01:42

What I want to create is a list view that will resize itself in order to show all items. Normally I would use AutoSize, but this won\'t work here. Any other options how can I ma

2条回答
  •  广开言路
    2021-01-22 01:58

    "AutoSize" property is not supported for the "ListView" control. As @JohnArien mentioned, you will have to programmatically re-size your list view control's size according to the number of items available. But be warned that this may not be a good idea in terms of visual appeal of the Form. Your form design might look ugly if you change the size in run time. More over these types of controls are expected to expand their client area within the given size with the help of scroll bars. I would strongly suggest you to reconsider this option.

提交回复
热议问题