How do you set Delphi ListView.Columns [0] to align correctly?

I have a Delphi ListView with ViewStyle: = vsReport. I am showing numeric data and would like to set all columns to the right. I was able to correctly substantiate all columns except columns [0]. For some reason, the [0] columns will not allow taRightJustify. This only allows taLeftJustify.

Is it possible to set the columns [0] to the right? If so, how do you do it?

+5
source share
1 answer

TListView does not support what you ask, due to the Microsoft limitation, and not the VCL limitation:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb774743.aspx

The alignment of the leftmost column is always equal to LVCFMT_LEFT; It cannot be changed.

The only way to align the text of columns [0] is to make it the owner.

Otherwise, switch to another control, such as Virtual Treeview .

+9
source

Source: https://habr.com/ru/post/1200640/


All Articles