如何在.net紧凑框架中删除listview中的水平滚动条

时间:2022-11-21 18:58:40

i am using listview while developing windows mobile 5.0 application. When items are added at the end it shows vertical as well as horizontal scrollbar. How can remove horizontal scrollbar?

我在开发Windows Mobile 5.0应用程序时使用listview。当项目在末尾添加时,它显示垂直和水平滚动条。如何删除水平滚动条?

1 个解决方案

#1


Just adjust the width of Listview. That is if you have a list view with width 50 and there is five columns. The sum of widths of columns should be less than or equal to 45. So you can get a 5 at end and the horizontal scroll is not shown. Horizontal scroll is only visible if u drag a header.

只需调整Listview的宽度即可。也就是说,如果您有一个宽度为50的列表视图,并且有五列。列的宽度总和应小于或等于45.因此,您可以在结尾处获得5并且不显示水平滚动。只有拖动标题,才能看到水平滚动。

#1


Just adjust the width of Listview. That is if you have a list view with width 50 and there is five columns. The sum of widths of columns should be less than or equal to 45. So you can get a 5 at end and the horizontal scroll is not shown. Horizontal scroll is only visible if u drag a header.

只需调整Listview的宽度即可。也就是说,如果您有一个宽度为50的列表视图,并且有五列。列的宽度总和应小于或等于45.因此,您可以在结尾处获得5并且不显示水平滚动。只有拖动标题,才能看到水平滚动。