ListView vs. ListBox for multiple column usage

前端 未结 4 1193
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 13:11

I am currently struggling with the GUI of my application. I have a hard time figuring out whether the ListBox or ListView is more \"suitable\" for multi-column representation of

4条回答
  •  萌比男神i
    2021-02-02 13:34

    Check this out

    https://stackoverflow.com/a/227355/988830

    Though listbox is used for single column and listview is used for mutlicolumn, the answer is it all depends.

    Sometimes you may need multicolumn list where you need to add different types of children. You cannot bind them using listview so its better to use listbox in such scenarios. But if you want to sort them by using header, do use listview because it is simple.

    In conclusion, I would say if you just have multi column data and nothing more better to use listview else if you want to do fancy stuff like buttons, treeview, expander etc. ListBox is really cool.

    Thanks, Omkar

提交回复
热议问题