如何将列设置在中心位置

how to set column in center position

好吧,我用这段代码命名了一个列,

listView1.Columns.Add("x").Width =100;

如何使 'x' 列显示在居中位置?

有一个构造函数重载可用于执行此操作

listView1.Columns.Add("x", 100, HorizontalAlignment.Center)

阅读此处了解更多详情https://msdn.microsoft.com/en-us/library/0ksz7ce2(v=vs.110).aspx