Is there any solution can make the text in the column and cell of ListView control to be more than 1 line?

Отвечено Is there any solution can make the text in the column and cell of ListView control to be more than 1 line?

  • 27 апреля 2012 г. 18:18
     
     

    I want to make the text in column of ListView control to be 2 lines. So I use the codes below to test. The result is bad.

    The "vbcrlf" in str2 doesnot work at all.

     Dim str1 As String = "Job Number12345"
     Dim str2 As String = "Job Number" + vbCrLf + "12345"

     ListView1.Columns.Add(str1, 100, HorizontalAlignment.Center)
     ListView1.Columns.Add(str2, 100, HorizontalAlignment.Center)
     Dim item As New ListViewItem(str1)
     item.SubItems.Add(str2)
     ListView1.Items.Add(item)


    Is there any solution can make the text in the column and cell of ListView control to be more than 1 line? Thanks in advance.



    • Изменено hyeewang 27 апреля 2012 г. 18:19
    •  

Все ответы