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

后端 未结 6 1028
离开以前
离开以前 2021-01-18 08:57

I wasn\'t able to find an answer anywhere about this seemingly simple topic: is it possible to align text of a single subitem in a WinForms ListView control?

6条回答
  •  萌比男神i
    2021-01-18 09:27

    The "ColumnHeader" class has a "TextAlign" property that will change the alignment for all subitems in the column. If you need something more fancy you could always use the "DrawSubItem" event and make it owner drawn.

提交回复
热议问题