Incorrect display in ListView


  • QA Engineer

    If listView1.View = View.SmallIcon; That's the result. How do you make the name of the file go beyond the pole? введите сюда описание изображения



  • The thing is, it's in mode. SmallIcon No poles♪ In it, the files are actually on the left to the right and on the top. So what you think is a breach of the pillars is not. Single regime ListView♪ that has poles is Details

    If you still want to leave the regime. SmallIconI can try something from the following:

    1. Cut the names of too long files on the counterol app.

      int maxLength = 10; // или любое другое подходящее значение
      

      var item = listView.Items.Add("very loooooooooong text");
      if (item.Text.Length > maxLength)
      {
      item.Text = item.Text.Remove(maxLength - 3) + "...";
      }
      else
      {
      item.Text = item.Text.PadRight(maxLength);
      }

    2. Use the component http://www.componentowl.com/better-listview-express which supports
      columns in all modes.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2