views:

354

answers:

2

I am creating a Windows Forms ListView, and set its SmallImageList to place an icon in the first column of each row. I have set the TextAlignment for the column header to "center", but the icons are left aligned - can anyone offer advice on how to center align these icons?

Thanks

A: 

On a .NET ListView, the contents of column 0 are always left-aligned. You cannot set the value of TextAlign to anything else. If you try, the .NET framework just ignores it.

Grammarian
A: 

I was able to achieve the desired effect by setting the ListViewItem's IndentCount.

Ronnie