Ask Experts Questions for FREE Help !
Ask
    Mistery1's Avatar
    Mistery1 Posts: 39, Reputation: 1
    Junior Member
     
    #1

    Jan 23, 2009, 03:56 AM
    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.
    more2come3's Avatar
    more2come3 Posts: 2, Reputation: 1
    New Member
     
    #2

    Jan 23, 2009, 05:32 AM

    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..
    Mistery1's Avatar
    Mistery1 Posts: 39, Reputation: 1
    Junior Member
     
    #3

    Jan 23, 2009, 05:47 AM
    Hi there,

    Thanks for helping out, but it does not work. It does not even give me errors
    Mistery1's Avatar
    Mistery1 Posts: 39, Reputation: 1
    Junior Member
     
    #4

    Jan 23, 2009, 08:12 AM
    Hi there,

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

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Cannot write in textbox in IE in windows XP [ 3 Answers ]

I am not able to write in internet explorer in windows explorer for last few days. It is windows XP with SP2. Radio buttins and othen stuff is working fine. I run Ad-aware and AVG anti-virus with zero virus. Can somebofy help me out.

Textbox Size Limit, IE [ 2 Answers ]

Does anyone have an explanation to why textbox size tag parameter doesn't work on any internet explorer versions but does apply on Firefox and Opera latest versions? I want to limit how wide the textbox stretches but it doesn't work on IE.

ListBox problem [ 1 Answers ]

If lstSchedule.Items.Contains((0)) = True Then objWriter.WriteLine((0)) End If If lstSchedule.Items.Contains((1)) = True Then objWriter.WriteLine((1)) -----------------------until objWriter.WriteLine((7))--------------------- is this...


View more questions Search