Of course, you are right, I'll add a dummy column
Thanks a lot...
Trent,
I could not believe it was simply a "bug by design" from MS
As Trent said, this is behavior that has been inherited from the standard Microsoft ListView. The first column added to the column's collection cannot be set to right aligned via the property sheet, and the topmost column in the collection (whether it was the first column created or not) will always be left aligned regardless of what the alignment property is set to. I have no idea why they do it that way, but until we have our own listview that doesn't inherit from Microsoft's, we are going to have to work around it .
Yes, but it wil have to come from Microsoft! Our ListView inherits from the standard .NET ListView. This will change in future releases so that we have 100% control over things just like this. Dustin will post a workaround shortly.
Maybe you can have a dummy fist column (Index 0) with 0 width and not header, then have the real column (Index 1) which will hold your integer and can get the alignment to the right with no problem.
I believe there should be some technical explanation as to why the first column can not be aligned to the right.
I need to right align the 1st column of a listview, where data are Integer.I understand that these integer are "mapped" to text for displaying in the listview, but why is it impossible to set alignment to right on the first column (and only the first, alignment works fine on other columns)either in property sheet or in ListPopulating event, it does not work.
As a workaround, I set the format to D5, but the readability is poor. What do I forget? How could I right align, or PADL with spaces?
thanks