0

Is there a way to wrap the text on the list box items, i.e. go to the next line, when they're too long for the box. A few of my items are too long to fit, so they are truncated.

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by OldQBasicer
0

>Is there a way to wrap the text on the list box items.

Yes. OwnerDrawn ListBox.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListBox1.DrawMode = DrawMode.OwnerDrawVariable
        AddHandler ListBox1.DrawItem, AddressOf drawIt
    End Sub

    Sub drawIt(ByVal sender As Object, ByVal e As DrawItemEventArgs)
       ....
    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.