ListView control can only display 259 characters per column (321104)
The information in this article applies to:
- Microsoft Visual Basic 2005 Express Edition
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
This article was previously published under Q321104 SYMPTOMS
When you add long strings to a ListView control, all of the string is added to the items collection, but the control can only display the first 259 characters of each item.
RESOLUTION
To display the full text of an item in the ListView control, you can populate a TextBox control with the selected value. For example, the following code populates a TextBox (TextBox1) with the text from the first item that is selected from the ListBox control (ListBox1):
Private Sub ListView1_SelectedIndexChanged(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles ListView1.SelectedIndexChanged
Me.TextBox1.Text = ListView1.SelectedItems(0).Text
End Sub
STATUSThis behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/28/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbCtrl kbListView kbprb KB321104 |
---|
|