如何在Windows窗体应用程序C#中具有固定的listview列宽? [英] how to have a fixed listview column width in a windows form application C# ?
本文介绍了如何在Windows窗体应用程序C#中具有固定的listview列宽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Windows窗体应用程序C#中具有固定的listview列宽?
我要停止用户调整列宽.我尝试了上述方法.它们都不起作用...:/[/Edit]
how to have a fixed listview column width in a windows form application C# ?
i want to stop the user adjusting the column width. I tried the above methods. none of them worked... :/[/Edit]
推荐答案
^ ]可能会为您提供帮助.
These discussions[^] may help you.
查看此处: 锁定ListView列大小 [
尝试
private void listView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { e.Cancel = true; e.NewWidth = listView.Columns[e.ColumnIndex].Width; }
参考链接:-如何在C#Windows窗体中修复列表视图的列宽 [
Reference Link :- how to fix the column width of a listview in c# windows form[^]
这篇关于如何在Windows窗体应用程序C#中具有固定的listview列宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文