It may make a difference to set:
ColumnHeader header;
then, the header.Width
property to something else, maybe throw it in
SelectionChanged{}(
header.Width = listView.SelectedItem(0).Length;
)
Give it a shot. I'm just thinking that the header / column width is playing tricks with how it's defaulted, or potentially set by you with the -2
This link may help with ColumnHeaders: MSDN ColumnHeaders
EDIT:
So I have reviewed some of the CompactFramework stuff.
This Link seems to be relevant to the same issue.
Try setting your ColumnWidth property to -1
listView1.Columns.Add(String.Empty, -1, HorizontalAlignment.Left);
That should set it to the widest value in the column. I do see the -2 options should work, but try -1, just to see if it makes a difference.
Double Edit:
Our comments have been moved into a Chat / Discussion
, although we have been unable to figure out what is causing this. If anyone has suggestions or knows a fix, please inform us!
ColumnHeader header;
header.Width
property to something else, maybe throw it inSelectionChanged{}( header.Width = listView.SelectedItem(0).Length;
– Microfilm