I have a ListView
with some ListViewItems
(only text).
listView1 = new ListView
{
View = System.Windows.Forms.View.Details,
HeaderStyle = ColumnHeaderStyle.None
};
listView1.Columns.Add(String.Empty, -2, HorizontalAlignment.Left);
The following image is an example:
The problem is that when I select one of these items the text is truncated, like in the following image:
Why? How can I solve this problem?
The problem is that the Text of your ListViewItem ends with empty spaces. You have to TrimEnd the string and you have your solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With