Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2002
    Posts
    1

    Question Unanswered: Wrapping in a Listbox

    I could do with a list box or some code that would allow a listbox to wrap text, so one list item could take two lines, any suggestions?

  2. #2
    Join Date
    Apr 2002
    Posts
    4

    Post

    A simple solution would be to use a combo box instead: as long as the list width property is big enough (not auto), the text will show on the dropdown list in one long line.

    A complicated solution that looked more like a listbox would be to make a subform showing as continuous forms, with a text box two lines tall. You'd keep the vertical scrollbar only, remove all the other visually intrusive stuff (dividing lines, record selectors, navigation buttons), and play with borders to make it look like a list box. Then you'd have to write code to select the text when you click on it:

    Private Sub txtThing_Click()
    txtThing.SelStart = 0
    txtThing.SelLength = Len(txtThing)
    End Sub

    Finally, you'd retrieve the chosen value like this:

    chosenID = Me.mysubform.Form.thingID

    Any help?

    Joe

  3. #3
    Join Date
    Sep 2001
    Posts
    46
    Dear jjlw,can you send sample database to me for reference.

    Thanks.


    yeekuan@pd.jaring.my

  4. #4
    Join Date
    Apr 2002
    Posts
    4

    Post

    Here you are.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •