Checklistbox formating

donnacha

Well-known member
Joined
Feb 27, 2003
Messages
187
Hi folks,
I am trying to use a checklist box where I fill the data from a database table. The text is too long to fit in one line and I can not make the control any wider.

Does anybody know how to allow multi-line text to be associated with each checkbox item.

:confused:
 
how long is the text? just because you cant see it all it could be there still.
i just added a line of text 182 chars long to 1 , like this :
Code:
   Private Sub CheckedListBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CheckedListBox1.MouseDown
        MsgBox(CheckedListBox1.SelectedItem & Chr(10) & "length is :" & Len(CheckedListBox1.SelectedItem)) /// check if the string is complete.
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim str As String
        str = "abcdefghijklmnopqrstuvwxyz"
        str = str + str + str + str + str + str + str
        MsgBox(str.Length)
        CheckedListBox1.Items.Add(str)/// add the string to the checkedlistbox
    End Sub
 
Thanks, but getting the text into the checklist is not the problem, taht is done directly throught the datasourse field. I know the full thext is there but the user needs to be able to see the full text string. Thus I need something like a line/text wrap functionality to allow the whole string to be visible.

Any Ideas..
 
Back
Top