ListView with different text alignments?

6.8k Views Asked by At

How to set a ListView to align some columns right and some columns left?

I mean that I have a ListView that its layout is left to right but I want to be alignment of second column and anything under that to left?

Thanks in advance.

#BEGIN EDIT

View property of the ListView is Details .

I'm using some code like this code:

        ListViewItem a = new ListViewItem();
        a.Text = "Some Name";
        a.SubItems.Add("Some Phone num");
        listView1.Items.Add(a);

And I want to be TextAlignment of the Phone Number right but I don't want to change alignment of Name.

#END EDIT

1

There are 1 best solutions below

2
On

Something like this has been answered in past, maybe this will help you:

How do I align text for a single subitem in a ListView using C#?