Auto size the controls in winform

前端 未结 3 1735
伪装坚强ぢ
伪装坚强ぢ 2021-01-12 13:09

I\'ve a winform and I placed a listbox in that form. When I maximize the winform the size of the list box remains same.

But I dont want like this. I want to adjust

相关标签:
3条回答
  • 2021-01-12 13:16

    Look for the anchor properties. You can set the anchor to resize automatically following the form.

    The anchor has 4 sides. If you anchor to all 4 sides, the control will retain its size ratio according to the size of its parent form.

    0 讨论(0)
  • 2021-01-12 13:26

    Use the .Anchor property.

    0 讨论(0)
  • 2021-01-12 13:31

    You can set the Dock Property of the listbox to fill. if you are using list box in some parent control like splitter panel

    0 讨论(0)
提交回复
热议问题