Who knows how to right align column zero (used 'zero' because '0' cannot be searched for) of a ListView? The following works on column one and greater:


mov col.imask,LVCF_TEXT or LVCF_WIDTH or LVCF_FMT
mov col.fmt,LVCFMT_RIGHT


Thanks...
Posted on 2008-08-30 12:57:45 by green
According to MSDN "The leftmost column is always left justified".
Posted on 2008-08-31 00:58:40 by ti_mo_n
MSDN is doing their thing again. Column zero is always left justified. If you insert the column at one, you can right justify it. Try the following on the first column:


mov col.imask,LVCF_TEXT or LVCF_WIDTH or LVCF_FMT
mov col.fmt,LVCFMT_RIGHT
invoke SendMessage,handle,LVM_INSERTCOLUMN,1,addr col    ; note the 1 for the position number.


Yea I know, so what is my problem...
Posted on 2008-08-31 07:09:12 by green
your problem is not reading and understanding
column 0 (the first one) can NOT be right justified as it is always left justified according to the link you were given,
so without a lot of effort, it can't be done.. any other columns excluding the parent one (0) can be justified anyway
you want..
Posted on 2008-08-31 23:46:10 by evlncrn8
If you can imagine it, you can do it.
Don't let anyone tell you otherwise.

Workarounds are valid!
Posted on 2008-09-01 04:53:50 by Homer
Your solution is to create N+1 coumns, justify all but the first, then delete the first column.
Posted on 2008-09-01 08:50:49 by sapero

Your solution is to create N+1 coumns, justify all but the first, then delete the first column.


I agree sapero. This is nothing but another M$ idea that is useless. Why would you be able to adjust all columns but the zero????
Posted on 2008-09-01 10:44:17 by green