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.

Recommended Answers

All 2 Replies

>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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.