Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   Listbox and textbox in vb.net (https://www.askmehelpdesk.com/showthread.php?t=307484)

  • Jan 23, 2009, 03:56 AM
    Mistery1
    Listbox and textbox in vb.net
    Hi there,

    I wonder if anyone can help. I have a listbox and a textbox. At runtime I already have a list of items in the listbox. When I double click on these items its needs to appear in the textbox. At the moment I have the code that, when I double click on the item in the listbox ONLY one item is added to the textbox. I need to know how to autosize the textbox so that, when I click on many items in the listbox, it should appear in the textbox one below the other.
  • Jan 23, 2009, 05:32 AM
    more2come3

    make sure to set the wordwrap property of the textbox to true

    on the double click event of the listbox add this code...

    textbox1.text = textbox1.text + vbcrlf + listbox1.list(listbox1.listindex)

    hope this would help you..
  • Jan 23, 2009, 05:47 AM
    Mistery1
    Hi there,

    Thanks for helping out, but it does not work. It does not even give me errors
  • Jan 23, 2009, 08:12 AM
    Mistery1
    Hi there,

    I have the answer. Thanks a lot for you help.

  • All times are GMT -7. The time now is 08:03 AM.